@@ -28,7 +28,7 @@ |
||
| 28 | 28 | * |
| 29 | 29 | * @param mixed $value Value to render |
| 30 | 30 | * |
| 31 | - * @return mixed |
|
| 31 | + * @return string |
|
| 32 | 32 | */ |
| 33 | 33 | public function render($value) |
| 34 | 34 | { |
@@ -57,7 +57,7 @@ |
||
| 57 | 57 | $resolver |
| 58 | 58 | ->setRequired('actions') |
| 59 | 59 | ->setAllowedTypes('actions', 'array') |
| 60 | - ->setNormalizer('actions', function (Options $options, $actions) { |
|
| 60 | + ->setNormalizer('actions', function(Options $options, $actions) { |
|
| 61 | 61 | |
| 62 | 62 | $normalizedActions = []; |
| 63 | 63 | |
@@ -38,7 +38,7 @@ |
||
| 38 | 38 | public function build(ActionConfiguration $configuration) |
| 39 | 39 | { |
| 40 | 40 | if (true !== $this->isFilterFormRequired($configuration)) { |
| 41 | - return null; |
|
| 41 | + return null; |
|
| 42 | 42 | } |
| 43 | 43 | // retrieve the filters from the Action configuration |
| 44 | 44 | $filters = $configuration->getParameter('filters'); |
@@ -13,11 +13,11 @@ |
||
| 13 | 13 | { |
| 14 | 14 | $builder |
| 15 | 15 | ->add('id', CheckboxType::class) |
| 16 | - ->addModelTransformer(new CallbackTransformer(function ($value) { |
|
| 16 | + ->addModelTransformer(new CallbackTransformer(function($value) { |
|
| 17 | 17 | return $value->getId(); |
| 18 | 18 | var_dump($value); |
| 19 | 19 | die; |
| 20 | - }, function () { |
|
| 20 | + }, function() { |
|
| 21 | 21 | |
| 22 | 22 | })) |
| 23 | 23 | ; |
@@ -40,7 +40,7 @@ |
||
| 40 | 40 | */ |
| 41 | 41 | protected function render($template, array $context = []) |
| 42 | 42 | { |
| 43 | - $content = $this |
|
| 43 | + $content = $this |
|
| 44 | 44 | ->twig |
| 45 | 45 | ->render($template, $context) |
| 46 | 46 | ; |
@@ -3,7 +3,6 @@ |
||
| 3 | 3 | namespace LAG\AdminBundle\Field\Factory; |
| 4 | 4 | |
| 5 | 5 | use Exception; |
| 6 | -use LAG\AdminBundle\Action\Configuration\ActionConfiguration; |
|
| 7 | 6 | use LAG\AdminBundle\Application\Configuration\ApplicationConfiguration; |
| 8 | 7 | use LAG\AdminBundle\Configuration\Factory\ConfigurationFactory; |
| 9 | 8 | use LAG\AdminBundle\Field\FieldInterface; |
@@ -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 | { |
@@ -82,8 +82,7 @@ |
||
| 82 | 82 | if (false === $this->isPaginationRequired) { |
| 83 | 83 | // load entities from the DataProvider using a pagination system |
| 84 | 84 | $entities = $this->loadPaginate($criteria, $orderBy, $limit, $offset); |
| 85 | - } |
|
| 86 | - else { |
|
| 85 | + } else { |
|
| 87 | 86 | // if no pagination is required (edit action for example) |
| 88 | 87 | $entities = $this->loadWithoutPagination($criteria, $orderBy); |
| 89 | 88 | } |
@@ -143,7 +143,7 @@ |
||
| 143 | 143 | |
| 144 | 144 | if ($isPaginationRequired) { |
| 145 | 145 | // retrieve the page parameter value |
| 146 | - $this->page = (int)$request->get('page', 1); |
|
| 146 | + $this->page = (int) $request->get('page', 1); |
|
| 147 | 147 | } |
| 148 | 148 | |
| 149 | 149 | if (null !== $request->get('maxPerPage')) { |