src/Services/LikeableService.php
protected function getLikerUserId($userId)
    {
        if (is_null($userId)) {
            $userId = $this->loggedInUserId();
        }

        if (!$userId) {
            throw new LikerNotDefinedException();
        }

        return $userId;
    }
protected function getLikerUserId($userId)
    {
        if (is_null($userId)) {
            $userId = $this->loggedInUserId();
        }

        if (!$userId) {
            throw new LikerNotDefinedException();
        }

        return $userId;
    }
protected function getLikerUserId ( $ userId ) { if ( is_null ( $ userId ) ) { $ userId = $ this -> loggedInUserId ( ) ; } if ( ! $ userId ) { throw new LikerNotDefinedException ( ) ; } return $ userId ; }
Get current user id or get user id passed in.

@param int $userId
@return int

@throws \Cog\Likeable\Exceptions\LikerNotDefinedException
Get current user id or get user id passed in .