diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2019-04-10 22:02:47 +0300 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2019-04-10 22:02:47 +0300 |
commit | 83290fbd8d58f947a04df8c1a89dcb241cee318b (patch) | |
tree | 063396151580345c79c729161f026035a3f28337 /lib/Controller | |
parent | cf081227c459d1253a4f2394db330a548fb3677f (diff) |
Some more Controller cleanup
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'lib/Controller')
-rw-r--r-- | lib/Controller/AliasesController.php | 14 | ||||
-rw-r--r-- | lib/Controller/AutoCompleteController.php | 9 | ||||
-rw-r--r-- | lib/Controller/AvatarsController.php | 15 |
3 files changed, 13 insertions, 25 deletions
diff --git a/lib/Controller/AliasesController.php b/lib/Controller/AliasesController.php index ac9a4ca1b..1d16f19de 100644 --- a/lib/Controller/AliasesController.php +++ b/lib/Controller/AliasesController.php @@ -37,17 +37,13 @@ class AliasesController extends Controller { /** @var AliasesService */ private $aliasService; - /** - * @var IUser - */ + /** @var IUser */ private $currentUser; - /** - * @param string $appName - * @param IRequest $request - * @param AliasesService $aliasesService - */ - public function __construct($appName, IRequest $request, AliasesService $aliasesService, IUserSession $userSession) { + public function __construct(string $appName, + IRequest $request, + AliasesService $aliasesService, + IUserSession $userSession) { parent::__construct($appName, $request); $this->aliasService = $aliasesService; $this->currentUser = $userSession->getUser(); diff --git a/lib/Controller/AutoCompleteController.php b/lib/Controller/AutoCompleteController.php index 9b558baf2..a97340241 100644 --- a/lib/Controller/AutoCompleteController.php +++ b/lib/Controller/AutoCompleteController.php @@ -33,13 +33,8 @@ class AutoCompleteController extends Controller { /** @var AutoCompleteService */ private $service; - /** - * @param string $appName - * @param IRequest $request - * @param AutoCompleteService $service - * @param string $UserId - */ - public function __construct(string $appName, IRequest $request, + public function __construct(string $appName, + IRequest $request, AutoCompleteService $service) { parent::__construct($appName, $request); diff --git a/lib/Controller/AvatarsController.php b/lib/Controller/AvatarsController.php index 989badf3d..1c81fdc54 100644 --- a/lib/Controller/AvatarsController.php +++ b/lib/Controller/AvatarsController.php @@ -44,14 +44,11 @@ class AvatarsController extends Controller { /** @var ITimeFactory */ private $timeFactory; - /** - * @param string $appName - * @param IRequest $request - * @param IAvatarService $avatarService - * @param string $UserId - * @param ITimeFactory $timeFactory - */ - public function __construct(string $appName, IRequest $request, IAvatarService $avatarService, $UserId, ITimeFactory $timeFactory) { + public function __construct(string $appName, + IRequest $request, + IAvatarService $avatarService, + string $UserId, + ITimeFactory $timeFactory) { parent::__construct($appName, $request); $this->avatarService = $avatarService; @@ -68,7 +65,7 @@ class AvatarsController extends Controller { * @return JSONResponse */ public function url(string $email): JSONResponse { - if (is_null($email) || empty($email)) { + if (empty($email)) { return new JSONResponse([], Http::STATUS_BAD_REQUEST); } |