src/Services/UserService.php
/**
     * Method for fetching user via doctrine
     *
     * @param string $id ID of user entity
     *
     * @return User
     * @throws EntityNotFoundException
     */
Method for fetching user via doctrine
@param string $id ID of user entity

@return User
@throws EntityNotFoundException
Method for fetching user via doctrine @param string $id ID of user entity @return User @throws EntityNotFoundException
public function fetchUser(string $id): ?User
    {
        $user = $this->repository->find($id);
        if ( $user === null ) {
            throw new EntityNotFoundException();
        }
        return $user;
    }
public function fetchUser ( string $ id ) : ? User { $ user = $ this -> repository -> find ( $ id ) ; if ( $ user === null ) { throw new EntityNotFoundException ( ) ; } return $ user ; }
Method for fetching user via doctrine
 @param string $id ID of user entity
Method for fetching user via doctrine @param string $id ID of user entity