public function transform($user)
    {
        if (empty($user)) {
            $className = $this->userService->getUserClass();

            return new $className();
        }

        return $user;

    }
public function transform($user)
    {
        if (empty($user)) {
            $className = $this->userService->getUserClass();

            return new $className();
        }

        return $user;

    }
public function transform ( $ user ) { if ( empty ( $ user ) ) { $ className = $ this -> userService -> getUserClass ( ) ; return new $ className ( ) ; } return $ user ; }
This always return null or the full object because we transforming the whole form with this transformer

@param BaseUser $user
@return string
This always return null or the full object because we transforming the whole form with this transformer