migrations/Migration.php
protected function findItem($name)
    {
        $item = $this->authManager->getRole($name);

        if ($item instanceof Role) {
            return $item;
        }

        $item = $this->authManager->getPermission($name);

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

        return null;
    }
protected function findItem($name)
    {
        $item = $this->authManager->getRole($name);

        if ($item instanceof Role) {
            return $item;
        }

        $item = $this->authManager->getPermission($name);

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

        return null;
    }
protected function findItem ( $ name ) { $ item = $ this -> authManager -> getRole ( $ name ) ; if ( $ item instanceof Role ) { return $ item ; } $ item = $ this -> authManager -> getPermission ( $ name ) ; if ( $ item instanceof Permission ) { return $ item ; } return null ; }
Finds either role or permission or throws an exception if it is not found.

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