migrations/Migration.php
protected function findPermission($name)
    {
        $permission = $this->authManager->getPermission($name);

        if ($permission instanceof Permission) {
            return $permission;
        }

        return null;
    }
protected function findPermission($name)
    {
        $permission = $this->authManager->getPermission($name);

        if ($permission instanceof Permission) {
            return $permission;
        }

        return null;
    }
protected function findPermission ( $ name ) { $ permission = $ this -> authManager -> getPermission ( $ name ) ; if ( $ permission instanceof Permission ) { return $ permission ; } return null ; }
Finds the permission or throws an exception if it is not found.

@param  string $name
@return Permission|null
Finds the permission or throws an exception if it is not found .