@@ -253,7 +253,7 @@ discard block |
||
| 253 | 253 | * |
| 254 | 254 | * @param array $criteria |
| 255 | 255 | * @param array $orderBy |
| 256 | - * @param null $limit |
|
| 256 | + * @param integer $limit |
|
| 257 | 257 | * @param int $offset |
| 258 | 258 | */ |
| 259 | 259 | public function load(array $criteria, $orderBy = [], $limit = null, $offset = 1) |
@@ -353,7 +353,7 @@ discard block |
||
| 353 | 353 | } |
| 354 | 354 | |
| 355 | 355 | /** |
| 356 | - * @return array |
|
| 356 | + * @return integer[] |
|
| 357 | 357 | */ |
| 358 | 358 | public function getActionNames() |
| 359 | 359 | { |
@@ -105,6 +105,9 @@ discard block |
||
| 105 | 105 | */ |
| 106 | 106 | protected $translationPattern; |
| 107 | 107 | |
| 108 | + /** |
|
| 109 | + * @param string $locale |
|
| 110 | + */ |
|
| 108 | 111 | public function __construct(array $applicationConfiguration = [], $locale) |
| 109 | 112 | { |
| 110 | 113 | $resolver = new OptionsResolver(); |
@@ -201,7 +204,7 @@ discard block |
||
| 201 | 204 | } |
| 202 | 205 | |
| 203 | 206 | /** |
| 204 | - * @return mixed |
|
| 207 | + * @return string |
|
| 205 | 208 | */ |
| 206 | 209 | public function getTitle() |
| 207 | 210 | { |
@@ -217,7 +220,7 @@ discard block |
||
| 217 | 220 | } |
| 218 | 221 | |
| 219 | 222 | /** |
| 220 | - * @return mixed |
|
| 223 | + * @return string |
|
| 221 | 224 | */ |
| 222 | 225 | public function getLayout() |
| 223 | 226 | { |
@@ -233,7 +236,7 @@ discard block |
||
| 233 | 236 | } |
| 234 | 237 | |
| 235 | 238 | /** |
| 236 | - * @return mixed |
|
| 239 | + * @return string |
|
| 237 | 240 | */ |
| 238 | 241 | public function getBlockTemplate() |
| 239 | 242 | { |
@@ -249,7 +252,7 @@ discard block |
||
| 249 | 252 | } |
| 250 | 253 | |
| 251 | 254 | /** |
| 252 | - * @return mixed |
|
| 255 | + * @return string |
|
| 253 | 256 | */ |
| 254 | 257 | public function getDescription() |
| 255 | 258 | { |
@@ -281,7 +284,7 @@ discard block |
||
| 281 | 284 | } |
| 282 | 285 | |
| 283 | 286 | /** |
| 284 | - * @return mixed |
|
| 287 | + * @return string |
|
| 285 | 288 | */ |
| 286 | 289 | public function getDateFormat() |
| 287 | 290 | { |
@@ -372,7 +375,7 @@ discard block |
||
| 372 | 375 | } |
| 373 | 376 | |
| 374 | 377 | /** |
| 375 | - * @return mixed |
|
| 378 | + * @return integer |
|
| 376 | 379 | */ |
| 377 | 380 | public function getStringLengthTruncate() |
| 378 | 381 | { |
@@ -146,7 +146,7 @@ discard block |
||
| 146 | 146 | 'url_pattern', |
| 147 | 147 | 'name_pattern', |
| 148 | 148 | ]); |
| 149 | - $resolver->setNormalizer('url_pattern', function (Options $options, $value) { |
|
| 149 | + $resolver->setNormalizer('url_pattern', function(Options $options, $value) { |
|
| 150 | 150 | if (strstr($value, '{admin}') === false) { |
| 151 | 151 | throw new InvalidOptionsException('Admin routing configuration url pattern should contains {admin} placeholder'); |
| 152 | 152 | } |
@@ -156,7 +156,7 @@ discard block |
||
| 156 | 156 | |
| 157 | 157 | return $value; |
| 158 | 158 | }); |
| 159 | - $resolver->setNormalizer('name_pattern', function (Options $options, $value) { |
|
| 159 | + $resolver->setNormalizer('name_pattern', function(Options $options, $value) { |
|
| 160 | 160 | if (strstr($value, '{admin}') === false) { |
| 161 | 161 | throw new InvalidOptionsException('Admin routing configuration pattern name should contains {admin} placeholder'); |
| 162 | 162 | } |
@@ -174,7 +174,7 @@ discard block |
||
| 174 | 174 | ->clear() |
| 175 | 175 | ->setDefault('enabled', true) |
| 176 | 176 | ->setDefault('pattern', 'lag.admin.{key}'); |
| 177 | - $resolver->setNormalizer('pattern', function (Options $options, $value) { |
|
| 177 | + $resolver->setNormalizer('pattern', function(Options $options, $value) { |
|
| 178 | 178 | if (strstr($value, 'key') === false) { |
| 179 | 179 | throw new InvalidOptionsException('Admin translation configuration pattern should contains {key} placeholder'); |
| 180 | 180 | } |
@@ -106,7 +106,7 @@ |
||
| 106 | 106 | * Return action configuration resolver |
| 107 | 107 | * |
| 108 | 108 | * @param OptionsResolver $resolver |
| 109 | - * @param $actionName |
|
| 109 | + * @param string $actionName |
|
| 110 | 110 | * @param Admin|null $admin |
| 111 | 111 | */ |
| 112 | 112 | protected function configureOptionsResolver(OptionsResolver $resolver, $actionName, Admin $admin = null) |
@@ -8,7 +8,6 @@ |
||
| 8 | 8 | use LAG\AdminBundle\Admin\AdminInterface; |
| 9 | 9 | use LAG\AdminBundle\Admin\Configuration\ActionConfiguration; |
| 10 | 10 | use LAG\AdminBundle\Admin\Configuration\ApplicationConfiguration; |
| 11 | -use Symfony\Component\OptionsResolver\Exception\InvalidOptionsException; |
|
| 12 | 11 | use Symfony\Component\OptionsResolver\Options; |
| 13 | 12 | use Symfony\Component\OptionsResolver\OptionsResolver; |
| 14 | 13 | |
@@ -157,7 +157,7 @@ discard block |
||
| 157 | 157 | Admin::LOAD_STRATEGY_UNIQUE, |
| 158 | 158 | Admin::LOAD_STRATEGY_MULTIPLE, |
| 159 | 159 | ]) |
| 160 | - ->setNormalizer('route', function (Options $options, $value) use ($admin, $actionName) { |
|
| 160 | + ->setNormalizer('route', function(Options $options, $value) use ($admin, $actionName) { |
|
| 161 | 161 | if (!$value) { |
| 162 | 162 | // if no route was provided, it should be linked to an Admin |
| 163 | 163 | if (!$admin) { |
@@ -168,7 +168,7 @@ discard block |
||
| 168 | 168 | } |
| 169 | 169 | return $value; |
| 170 | 170 | }) |
| 171 | - ->setNormalizer('title', function (Options $options, $value) use ($admin, $actionName) { |
|
| 171 | + ->setNormalizer('title', function(Options $options, $value) use ($admin, $actionName) { |
|
| 172 | 172 | if (!$value) { |
| 173 | 173 | $adminKey = ''; |
| 174 | 174 | // if an Admin is linked to this action, we use its name in translation key |
@@ -179,7 +179,7 @@ discard block |
||
| 179 | 179 | } |
| 180 | 180 | return $value; |
| 181 | 181 | }) |
| 182 | - ->setNormalizer('batch', function (Options $options, $value) use ($admin, $actionName) { |
|
| 182 | + ->setNormalizer('batch', function(Options $options, $value) use ($admin, $actionName) { |
|
| 183 | 183 | if ($value) { |
| 184 | 184 | if (!is_array($value)) { |
| 185 | 185 | $value = [$value]; |
@@ -51,7 +51,7 @@ discard block |
||
| 51 | 51 | /** |
| 52 | 52 | * Find an entity by its unique id |
| 53 | 53 | * |
| 54 | - * @param $id |
|
| 54 | + * @param string $id |
|
| 55 | 55 | * @return object |
| 56 | 56 | */ |
| 57 | 57 | public function find($id) |
@@ -64,7 +64,7 @@ discard block |
||
| 64 | 64 | /** |
| 65 | 65 | * Save an entity |
| 66 | 66 | * |
| 67 | - * @param $entity |
|
| 67 | + * @param \stdClass $entity |
|
| 68 | 68 | */ |
| 69 | 69 | public function save($entity) |
| 70 | 70 | { |
@@ -76,7 +76,7 @@ discard block |
||
| 76 | 76 | /** |
| 77 | 77 | * Remove an entity |
| 78 | 78 | * |
| 79 | - * @param $entity |
|
| 79 | + * @param \stdClass $entity |
|
| 80 | 80 | */ |
| 81 | 81 | public function remove($entity) |
| 82 | 82 | { |
@@ -43,7 +43,7 @@ |
||
| 43 | 43 | /** |
| 44 | 44 | * ExtraConfigurationSubscriber constructor |
| 45 | 45 | * |
| 46 | - * @param bool|true $enableExtraConfiguration |
|
| 46 | + * @param boolean $enableExtraConfiguration |
|
| 47 | 47 | * @param EntityManager $entityManager |
| 48 | 48 | * @param ApplicationConfiguration $applicationConfiguration |
| 49 | 49 | */ |
@@ -16,7 +16,7 @@ |
||
| 16 | 16 | * |
| 17 | 17 | * @param ObjectManager $objectManager |
| 18 | 18 | * @param ObjectRepository $repository |
| 19 | - * @param $entityClassName |
|
| 19 | + * @param string|null $entityClassName |
|
| 20 | 20 | */ |
| 21 | 21 | public function __construct(ObjectManager $objectManager, ObjectRepository $repository, $entityClassName) |
| 22 | 22 | { |
@@ -20,6 +20,9 @@ |
||
| 20 | 20 | } |
| 21 | 21 | } |
| 22 | 22 | |
| 23 | + /** |
|
| 24 | + * @param string $adminName |
|
| 25 | + */ |
|
| 23 | 26 | protected function doTestAdmin(AdminInterface $admin, array $configuration, $adminName) |
| 24 | 27 | { |
| 25 | 28 | $this->assertEquals($admin->getName(), $adminName); |
@@ -77,7 +77,7 @@ discard block |
||
| 77 | 77 | /** |
| 78 | 78 | * Assert that an exception is raised in the given code. |
| 79 | 79 | * |
| 80 | - * @param $exceptionClass |
|
| 80 | + * @param string $exceptionClass |
|
| 81 | 81 | * @param Closure $closure |
| 82 | 82 | */ |
| 83 | 83 | protected function assertExceptionRaised($exceptionClass, Closure $closure) |
@@ -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 | { |
@@ -237,7 +237,7 @@ discard block |
||
| 237 | 237 | /** |
| 238 | 238 | * Return a mock of an entity repository |
| 239 | 239 | * |
| 240 | - * @return RepositoryInterface|PHPUnit_Framework_MockObject_MockObject |
|
| 240 | + * @return RepositoryInterface |
|
| 241 | 241 | */ |
| 242 | 242 | protected function mockEntityRepository() |
| 243 | 243 | { |
@@ -275,7 +275,7 @@ discard block |
||
| 275 | 275 | } |
| 276 | 276 | |
| 277 | 277 | /** |
| 278 | - * @return ActionFactory|PHPUnit_Framework_MockObject_MockObject |
|
| 278 | + * @return ActionFactory |
|
| 279 | 279 | */ |
| 280 | 280 | protected function mockActionFactory() |
| 281 | 281 | { |
@@ -317,7 +317,7 @@ discard block |
||
| 317 | 317 | } |
| 318 | 318 | |
| 319 | 319 | /** |
| 320 | - * @return MessageHandlerInterface|PHPUnit_Framework_MockObject_MockObject |
|
| 320 | + * @return MessageHandlerInterface |
|
| 321 | 321 | */ |
| 322 | 322 | protected function mockMessageHandler() |
| 323 | 323 | { |
@@ -340,7 +340,7 @@ discard block |
||
| 340 | 340 | } |
| 341 | 341 | |
| 342 | 342 | /** |
| 343 | - * @return DataProviderInterface|PHPUnit_Framework_MockObject_MockObject |
|
| 343 | + * @return DataProviderInterface |
|
| 344 | 344 | */ |
| 345 | 345 | protected function mockDataProvider() |
| 346 | 346 | { |
@@ -259,7 +259,7 @@ |
||
| 259 | 259 | $repository = $this->mockEntityRepository(); |
| 260 | 260 | $repository |
| 261 | 261 | ->method('getEntityPersister') |
| 262 | - ->willReturn( $this |
|
| 262 | + ->willReturn($this |
|
| 263 | 263 | ->getMockBuilder('Doctrine\ORM\Persisters\Entity\BasicEntityPersister') |
| 264 | 264 | ->disableOriginalConstructor() |
| 265 | 265 | ->getMock()); |
@@ -53,7 +53,7 @@ discard block |
||
| 53 | 53 | } |
| 54 | 54 | |
| 55 | 55 | /** |
| 56 | - * @return array |
|
| 56 | + * @return Twig_SimpleFunction[] |
|
| 57 | 57 | */ |
| 58 | 58 | public function getFunctions() |
| 59 | 59 | { |
@@ -67,7 +67,7 @@ discard block |
||
| 67 | 67 | } |
| 68 | 68 | |
| 69 | 69 | /** |
| 70 | - * @return array |
|
| 70 | + * @return Twig_SimpleFilter[] |
|
| 71 | 71 | */ |
| 72 | 72 | public function getFilters() |
| 73 | 73 | { |
@@ -3,7 +3,6 @@ |
||
| 3 | 3 | namespace LAG\AdminBundle\Twig; |
| 4 | 4 | |
| 5 | 5 | use LAG\AdminBundle\Admin\Configuration\ApplicationConfiguration; |
| 6 | -use LAG\AdminBundle\Admin\Field; |
|
| 7 | 6 | use LAG\AdminBundle\Admin\Field\EntityFieldInterface; |
| 8 | 7 | use LAG\AdminBundle\Admin\FieldInterface; |
| 9 | 8 | use Symfony\Component\DependencyInjection\Container; |