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

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

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

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

        return null;
    }
protected function findRole ( $ name ) { $ role = $ this -> authManager -> getRole ( $ name ) ; if ( $ role instanceof Role ) { return $ role ; } return null ; }
Finds the role or throws an exception if it is not found.

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