src/Gzero/Api/Transformer/UserTransformer.php
public function transform($user)
    {
        $user = $this->entityToArray(User::class, $user);
        return [
            'id'        => (int) $user['id'],
            'email'     => $user['email'],
            'nick'      => $user['nick'],
            'firstName' => $user['first_name'],
            'lastName'  => $user['last_name'],
            'roles'     => !empty($user['roles']) ? $user['roles'] : []
        ];
    }
public function transform($user)
    {
        $user = $this->entityToArray(User::class, $user);
        return [
            'id'        => (int) $user['id'],
            'email'     => $user['email'],
            'nick'      => $user['nick'],
            'firstName' => $user['first_name'],
            'lastName'  => $user['last_name'],
            'roles'     => !empty($user['roles']) ? $user['roles'] : []
        ];
    }
public function transform ( $ user ) { $ user = $ this -> entityToArray ( User :: class , $ user ) ; return [ 'id' => ( int ) $ user [ 'id' ] , 'email' => $ user [ 'email' ] , 'nick' => $ user [ 'nick' ] , 'firstName' => $ user [ 'first_name' ] , 'lastName' => $ user [ 'last_name' ] , 'roles' => ! empty ( $ user [ 'roles' ] ) ? $ user [ 'roles' ] : [ ] ] ; }
Transforms user entity

@param User|array $user User entity

@return array
Transforms user entity