From 415efe9e6eaa1806600f4d0d6ad10d5de018be0d Mon Sep 17 00:00:00 2001 From: Alexey Skobkin Date: Fri, 13 Jan 2017 02:18:57 +0300 Subject: [PATCH] New PHP 7.1 type hints for service exceptions. --- .../Exceptions/Factory/InvalidUserDataException.php | 5 +---- .../Service/Exceptions/UserNotFoundException.php | 12 ++---------- 2 files changed, 3 insertions(+), 14 deletions(-) diff --git a/src/Skobkin/Bundle/PointToolsBundle/Service/Exceptions/Factory/InvalidUserDataException.php b/src/Skobkin/Bundle/PointToolsBundle/Service/Exceptions/Factory/InvalidUserDataException.php index 9f86ee4..55e1aee 100644 --- a/src/Skobkin/Bundle/PointToolsBundle/Service/Exceptions/Factory/InvalidUserDataException.php +++ b/src/Skobkin/Bundle/PointToolsBundle/Service/Exceptions/Factory/InvalidUserDataException.php @@ -20,10 +20,7 @@ class InvalidUserDataException extends \Exception parent::__construct($message, $code, $previous); } - /** - * @return User - */ - public function getUser() + public function getUser(): User { return $this->user; } diff --git a/src/Skobkin/Bundle/PointToolsBundle/Service/Exceptions/UserNotFoundException.php b/src/Skobkin/Bundle/PointToolsBundle/Service/Exceptions/UserNotFoundException.php index 81c4477..a4fe2bc 100644 --- a/src/Skobkin/Bundle/PointToolsBundle/Service/Exceptions/UserNotFoundException.php +++ b/src/Skobkin/Bundle/PointToolsBundle/Service/Exceptions/UserNotFoundException.php @@ -27,20 +27,12 @@ class UserNotFoundException extends ApiException $this->login = $login; } - /** - * Returns ID of user which was not found - * - * @return int - */ - public function getUserId() + public function getUserId(): int { return $this->userId; } - /** - * @return string - */ - public function getLogin() + public function getLogin(): string { return $this->login; }