src/Sulu/Bundle/SecurityBundle/Command/CreateUserCommand.php
private function getRoleNames()
    {
        $roleNames = $this->roleRepository->getRoleNames();

        if (empty($roleNames)) {
            throw new \RuntimeException(sprintf(
                'The system currently has no roles. Use the "sulu:security:role:create" command to create roles.'
            ));
        }

        return $roleNames;
    }
private function getRoleNames()
    {
        $roleNames = $this->roleRepository->getRoleNames();

        if (empty($roleNames)) {
            throw new \RuntimeException(sprintf(
                'The system currently has no roles. Use the "sulu:security:role:create" command to create roles.'
            ));
        }

        return $roleNames;
    }
private function getRoleNames ( ) { $ roleNames = $ this -> roleRepository -> getRoleNames ( ) ; if ( empty ( $ roleNames ) ) { throw new \ RuntimeException ( sprintf ( 'The system currently has no roles. Use the "sulu:security:role:create" command to create roles.' ) ) ; } return $ roleNames ; }
Return the names of all the roles.

@return array

@throws \RuntimeException If no roles exist
Return the names of all the roles .