public function getUserCapabilities(string $userId): array
    {
        if (empty($this->userCapabilities)) {
            $this->userCapabilities = Utils::fetchUserCapabilities($userId);
        }

        return $this->userCapabilities;
    }
public function getUserCapabilities(string $userId): array
    {
        if (empty($this->userCapabilities)) {
            $this->userCapabilities = Utils::fetchUserCapabilities($userId);
        }

        return $this->userCapabilities;
    }
public function getUserCapabilities ( string $ userId ) : array { if ( empty ( $ this -> userCapabilities ) ) { $ this -> userCapabilities = Utils :: fetchUserCapabilities ( $ userId ) ; } return $ this -> userCapabilities ; }
Method that retrieves specified user's capabilities
@param  string $userId user id
@return mixed[]
Method that retrieves specified user s capabilities