private function checkId(Segment $segment, $id)
    {
        $user = $this->usersRepository->find($id);
        if (!$user) {
            return false;
        }
        return $segment->isIn('id', $id);
    }
private function checkId(Segment $segment, $id)
    {
        $user = $this->usersRepository->find($id);
        if (!$user) {
            return false;
        }
        return $segment->isIn('id', $id);
    }
private function checkId ( Segment $ segment , $ id ) { $ user = $ this -> usersRepository -> find ( $ id ) ; if ( ! $ user ) { return false ; } return $ segment -> isIn ( 'id' , $ id ) ; }
checkId verifies whether user with given ID is member of provided segment.

@param Segment $segment
@param $id
@return bool
checkId verifies whether user with given ID is member of provided segment .