src/Rbac/BaseManager.php
public function getPermission($name)
    {
        return $this->getItem($name)->then(
            function($item) use ($name) {
                if ($item instanceof Item && $item->type == Item::TYPE_PERMISSION) {
                    return $item;
                }
                return reject(new Error("Permission '$name' not found"));
            }
        );
    }
public function getPermission($name)
    {
        return $this->getItem($name)->then(
            function($item) use ($name) {
                if ($item instanceof Item && $item->type == Item::TYPE_PERMISSION) {
                    return $item;
                }
                return reject(new Error("Permission '$name' not found"));
            }
        );
    }
{@inheritdoc}