@@ -156,7 +156,7 @@ discard block |
||
| 156 | 156 | /** |
| 157 | 157 | * Check if user is allowed to be here |
| 158 | 158 | * |
| 159 | - * @param UserInterface|string $user |
|
| 159 | + * @param null|\Symfony\Component\Security\Core\User\User $user |
|
| 160 | 160 | * @throws Exception |
| 161 | 161 | */ |
| 162 | 162 | public function checkPermissions($user) |
@@ -325,7 +325,7 @@ discard block |
||
| 325 | 325 | /** |
| 326 | 326 | * Return loaded entities |
| 327 | 327 | * |
| 328 | - * @return mixed |
|
| 328 | + * @return ArrayCollection |
|
| 329 | 329 | */ |
| 330 | 330 | public function getEntities() |
| 331 | 331 | { |
@@ -401,7 +401,7 @@ discard block |
||
| 401 | 401 | } |
| 402 | 402 | |
| 403 | 403 | /** |
| 404 | - * @return array |
|
| 404 | + * @return integer[] |
|
| 405 | 405 | */ |
| 406 | 406 | public function getActionNames() |
| 407 | 407 | { |
@@ -124,8 +124,8 @@ discard block |
||
| 124 | 124 | } |
| 125 | 125 | |
| 126 | 126 | /** |
| 127 | - * @param $name |
|
| 128 | - * @param $configuration |
|
| 127 | + * @param string $name |
|
| 128 | + * @param \LAG\AdminBundle\Admin\Configuration\AdminConfiguration $configuration |
|
| 129 | 129 | * @return Admin |
| 130 | 130 | */ |
| 131 | 131 | protected function mockAdmin($name, $configuration) |
@@ -140,7 +140,7 @@ discard block |
||
| 140 | 140 | |
| 141 | 141 | /** |
| 142 | 142 | * @param $name |
| 143 | - * @return ActionInterface|PHPUnit_Framework_MockObject_MockObject |
|
| 143 | + * @return ActionInterface |
|
| 144 | 144 | */ |
| 145 | 145 | protected function mockAction($name) |
| 146 | 146 | { |
@@ -242,7 +242,7 @@ discard block |
||
| 242 | 242 | /** |
| 243 | 243 | * Return a mock of an entity repository |
| 244 | 244 | * |
| 245 | - * @return RepositoryInterface|PHPUnit_Framework_MockObject_MockObject |
|
| 245 | + * @return RepositoryInterface |
|
| 246 | 246 | */ |
| 247 | 247 | protected function mockEntityRepository() |
| 248 | 248 | { |
@@ -280,7 +280,7 @@ discard block |
||
| 280 | 280 | } |
| 281 | 281 | |
| 282 | 282 | /** |
| 283 | - * @return ActionFactory|PHPUnit_Framework_MockObject_MockObject |
|
| 283 | + * @return ActionFactory |
|
| 284 | 284 | */ |
| 285 | 285 | protected function mockActionFactory() |
| 286 | 286 | { |
@@ -322,7 +322,7 @@ discard block |
||
| 322 | 322 | } |
| 323 | 323 | |
| 324 | 324 | /** |
| 325 | - * @return MessageHandlerInterface|PHPUnit_Framework_MockObject_MockObject |
|
| 325 | + * @return MessageHandlerInterface |
|
| 326 | 326 | */ |
| 327 | 327 | protected function mockMessageHandler() |
| 328 | 328 | { |
@@ -345,7 +345,7 @@ discard block |
||
| 345 | 345 | } |
| 346 | 346 | |
| 347 | 347 | /** |
| 348 | - * @return DataProviderInterface|PHPUnit_Framework_MockObject_MockObject |
|
| 348 | + * @return DataProviderInterface |
|
| 349 | 349 | */ |
| 350 | 350 | protected function mockDataProvider() |
| 351 | 351 | { |
@@ -40,13 +40,13 @@ discard block |
||
| 40 | 40 | |
| 41 | 41 | |
| 42 | 42 | // with no action, handleRequest method SHOULD throw an exception |
| 43 | - $this->assertExceptionRaised('Exception', function () use ($admin) { |
|
| 43 | + $this->assertExceptionRaised('Exception', function() use ($admin) { |
|
| 44 | 44 | $request = new Request(); |
| 45 | 45 | $admin->handleRequest($request); |
| 46 | 46 | }); |
| 47 | 47 | |
| 48 | 48 | // with a wrong action, handleRequest method SHOULD throw an exception |
| 49 | - $this->assertExceptionRaised('Exception', function () use ($admin) { |
|
| 49 | + $this->assertExceptionRaised('Exception', function() use ($admin) { |
|
| 50 | 50 | $request = new Request([], [], [ |
| 51 | 51 | '_route_params' => [ |
| 52 | 52 | '_action' => 'bad_action' |
@@ -75,13 +75,13 @@ discard block |
||
| 75 | 75 | $this->doTestAdmin($admin, $configuration, $adminName); |
| 76 | 76 | |
| 77 | 77 | // with a current action unset, checkPermissions method SHOULD throw an exception |
| 78 | - $this->assertExceptionRaised('Exception', function () use ($admin) { |
|
| 78 | + $this->assertExceptionRaised('Exception', function() use ($admin) { |
|
| 79 | 79 | $user = new User('JohnKrovitch', 'john1234'); |
| 80 | 80 | $admin->checkPermissions($user); |
| 81 | 81 | }); |
| 82 | 82 | |
| 83 | 83 | // with the wrong roles, checkPermissions method SHOULD throw an exception |
| 84 | - $this->assertExceptionRaised(NotFoundHttpException::class, function () use ($admin) { |
|
| 84 | + $this->assertExceptionRaised(NotFoundHttpException::class, function() use ($admin) { |
|
| 85 | 85 | $request = new Request([], [], [ |
| 86 | 86 | '_route_params' => [ |
| 87 | 87 | '_action' => 'custom_list' |
@@ -93,7 +93,7 @@ discard block |
||
| 93 | 93 | }); |
| 94 | 94 | |
| 95 | 95 | // with the wrong roles, checkPermissions method SHOULD throw an exception |
| 96 | - $this->assertExceptionRaised(NotFoundHttpException::class, function () use ($admin) { |
|
| 96 | + $this->assertExceptionRaised(NotFoundHttpException::class, function() use ($admin) { |
|
| 97 | 97 | $request = new Request([], [], [ |
| 98 | 98 | '_route_params' => [ |
| 99 | 99 | '_action' => 'custom_list' |