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'] : []
        ];
    }