Skip to content

Commit

Permalink
[CLEANUP] Fix a warning with newer PHPMD versions (#125)
Browse files Browse the repository at this point in the history
  • Loading branch information
Oliver Klee committed Dec 5, 2019
1 parent 30c05be commit 5725af3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Controller/SessionController.php
Expand Up @@ -35,7 +35,7 @@ class SessionController extends FOSRestController implements ClassResourceInterf
/**
* @var AdministratorTokenRepository
*/
private $administratorTokenRepository = null;
private $tokenRepository = null;

/**
* @param Authentication $authentication
Expand All @@ -49,7 +49,7 @@ public function __construct(
) {
$this->authentication = $authentication;
$this->administratorRepository = $administratorRepository;
$this->administratorTokenRepository = $tokenRepository;
$this->tokenRepository = $tokenRepository;
}

/**
Expand Down Expand Up @@ -96,7 +96,7 @@ public function deleteAction(Request $request, AdministratorToken $token): View
throw new AccessDeniedHttpException('You do not have access to this session.', null, 1519831644);
}

$this->administratorTokenRepository->remove($token);
$this->tokenRepository->remove($token);

return View::create();
}
Expand Down Expand Up @@ -131,7 +131,7 @@ private function createAndPersistToken(Administrator $administrator): Administra
$token->setAdministrator($administrator);
$token->generateExpiry();
$token->generateKey();
$this->administratorTokenRepository->save($token);
$this->tokenRepository->save($token);

return $token;
}
Expand Down

0 comments on commit 5725af3

Please sign in to comment.