@@ -65,7 +65,7 @@ |
||
| 65 | 65 | ->setDefaults([ |
| 66 | 66 | 'builder_condition' => self::CONDITION_AND, |
| 67 | 67 | 'fields_condition' => self::CONDITION_OR, |
| 68 | - 'fields' => function (Options $options, $fields) { |
|
| 68 | + 'fields' => function(Options $options, $fields) { |
|
| 69 | 69 | return $fields ?: [$options['filter']->getName()]; |
| 70 | 70 | }, |
| 71 | 71 | ]) |
@@ -25,7 +25,7 @@ |
||
| 25 | 25 | public function configureOptions(OptionsResolver $resolver) |
| 26 | 26 | { |
| 27 | 27 | $resolver |
| 28 | - ->setDefault('field', function (Options $options, $field) { |
|
| 28 | + ->setDefault('field', function(Options $options, $field) { |
|
| 29 | 29 | return $field ?: $options['sort']->getName(); |
| 30 | 30 | }) |
| 31 | 31 | ->setAllowedTypes('field', 'string'); |
@@ -70,7 +70,7 @@ |
||
| 70 | 70 | $resolver |
| 71 | 71 | ->setRequired('resource') |
| 72 | 72 | ->setAllowedTypes('resource', ['string', ResourceInterface::class]) |
| 73 | - ->setNormalizer('resource', function (Options $options, $resource) { |
|
| 73 | + ->setNormalizer('resource', function(Options $options, $resource) { |
|
| 74 | 74 | return is_string($resource) ? $this->resourceRegistry[$resource] : $resource; |
| 75 | 75 | }); |
| 76 | 76 | } |
@@ -83,7 +83,7 @@ |
||
| 83 | 83 | ->method('render') |
| 84 | 84 | ->with( |
| 85 | 85 | $this->identicalTo($grid = $this->createGridViewMock()), |
| 86 | - $this->callback(function (ColumnInterface $column) use ($resourcePath, $type, $options) { |
|
| 86 | + $this->callback(function(ColumnInterface $column) use ($resourcePath, $type, $options) { |
|
| 87 | 87 | return $column->getName() === $resourcePath |
| 88 | 88 | && $column->getLabel() === null |
| 89 | 89 | && $column->getType() === $type |
@@ -309,7 +309,7 @@ discard block |
||
| 309 | 309 | } |
| 310 | 310 | |
| 311 | 311 | /** |
| 312 | - * @return \PHPUnit_Framework_MockObject_MockObject|PropertyAccessorInterface |
|
| 312 | + * @return \PHPUnit_Framework_MockObject_MockObject |
|
| 313 | 313 | */ |
| 314 | 314 | private function createPropertyAccessorMock() |
| 315 | 315 | { |
@@ -317,7 +317,7 @@ discard block |
||
| 317 | 317 | } |
| 318 | 318 | |
| 319 | 319 | /** |
| 320 | - * @return \PHPUnit_Framework_MockObject_MockObject|RegistryInterface |
|
| 320 | + * @return \PHPUnit_Framework_MockObject_MockObject |
|
| 321 | 321 | */ |
| 322 | 322 | private function createServiceRegistryMock() |
| 323 | 323 | { |
@@ -325,7 +325,7 @@ discard block |
||
| 325 | 325 | } |
| 326 | 326 | |
| 327 | 327 | /** |
| 328 | - * @return \PHPUnit_Framework_MockObject_MockObject|ColumnRendererInterface |
|
| 328 | + * @return \PHPUnit_Framework_MockObject_MockObject |
|
| 329 | 329 | */ |
| 330 | 330 | private function createColumnRendererMock() |
| 331 | 331 | { |
@@ -333,7 +333,7 @@ discard block |
||
| 333 | 333 | } |
| 334 | 334 | |
| 335 | 335 | /** |
| 336 | - * @return \PHPUnit_Framework_MockObject_MockObject|ResourceInterface |
|
| 336 | + * @return \PHPUnit_Framework_MockObject_MockObject |
|
| 337 | 337 | */ |
| 338 | 338 | private function createResourceMock() |
| 339 | 339 | { |
@@ -341,7 +341,7 @@ discard block |
||
| 341 | 341 | } |
| 342 | 342 | |
| 343 | 343 | /** |
| 344 | - * @return \PHPUnit_Framework_MockObject_MockObject|GridViewInterface |
|
| 344 | + * @return \PHPUnit_Framework_MockObject_MockObject |
|
| 345 | 345 | */ |
| 346 | 346 | private function createGridViewMock() |
| 347 | 347 | { |
@@ -349,7 +349,7 @@ discard block |
||
| 349 | 349 | } |
| 350 | 350 | |
| 351 | 351 | /** |
| 352 | - * @return \PHPUnit_Framework_MockObject_MockObject|ColumnInterface |
|
| 352 | + * @return \PHPUnit_Framework_MockObject_MockObject |
|
| 353 | 353 | */ |
| 354 | 354 | private function createColumnMock() |
| 355 | 355 | { |
@@ -100,7 +100,7 @@ |
||
| 100 | 100 | $sortType |
| 101 | 101 | ->expects($this->once()) |
| 102 | 102 | ->method('configureOptions') |
| 103 | - ->with($this->callback(function (OptionsResolver $resolver) use ($options) { |
|
| 103 | + ->with($this->callback(function(OptionsResolver $resolver) use ($options) { |
|
| 104 | 104 | $resolver->setDefined(array_merge(['builder', 'sort', 'grid'], array_keys($options))); |
| 105 | 105 | |
| 106 | 106 | return true; |
@@ -127,7 +127,7 @@ discard block |
||
| 127 | 127 | } |
| 128 | 128 | |
| 129 | 129 | /** |
| 130 | - * @return \PHPUnit_Framework_MockObject_MockObject|RegistryInterface |
|
| 130 | + * @return \PHPUnit_Framework_MockObject_MockObject |
|
| 131 | 131 | */ |
| 132 | 132 | private function createServiceRegistryMock() |
| 133 | 133 | { |
@@ -135,7 +135,7 @@ discard block |
||
| 135 | 135 | } |
| 136 | 136 | |
| 137 | 137 | /** |
| 138 | - * @return \PHPUnit_Framework_MockObject_MockObject|DataSourceBuilderInterface |
|
| 138 | + * @return \PHPUnit_Framework_MockObject_MockObject |
|
| 139 | 139 | */ |
| 140 | 140 | private function createDataSourceBuilderMock() |
| 141 | 141 | { |
@@ -143,7 +143,7 @@ discard block |
||
| 143 | 143 | } |
| 144 | 144 | |
| 145 | 145 | /** |
| 146 | - * @return \PHPUnit_Framework_MockObject_MockObject|GridInterface |
|
| 146 | + * @return \PHPUnit_Framework_MockObject_MockObject |
|
| 147 | 147 | */ |
| 148 | 148 | private function createGridMock() |
| 149 | 149 | { |
@@ -151,7 +151,7 @@ discard block |
||
| 151 | 151 | } |
| 152 | 152 | |
| 153 | 153 | /** |
| 154 | - * @return \PHPUnit_Framework_MockObject_MockObject|SortInterface |
|
| 154 | + * @return \PHPUnit_Framework_MockObject_MockObject |
|
| 155 | 155 | */ |
| 156 | 156 | private function createSortMock() |
| 157 | 157 | { |
@@ -159,7 +159,7 @@ discard block |
||
| 159 | 159 | } |
| 160 | 160 | |
| 161 | 161 | /** |
| 162 | - * @return \PHPUnit_Framework_MockObject_MockObject|TypeInterface |
|
| 162 | + * @return \PHPUnit_Framework_MockObject_MockObject |
|
| 163 | 163 | */ |
| 164 | 164 | private function createSortTypeMock() |
| 165 | 165 | { |
@@ -34,16 +34,16 @@ |
||
| 34 | 34 | ->setAllowedTypes('resource', ResourceInterface::class) |
| 35 | 35 | ->setAllowedTypes('factory', FactoryInterface::class) |
| 36 | 36 | ->setDefaults([ |
| 37 | - 'data_class' => function (Options $options) { |
|
| 37 | + 'data_class' => function(Options $options) { |
|
| 38 | 38 | return $options['resource']->getModel(); |
| 39 | 39 | }, |
| 40 | - 'label_prefix' => function (Options $options) { |
|
| 40 | + 'label_prefix' => function(Options $options) { |
|
| 41 | 41 | return 'lug.'.$options['resource']->getName(); |
| 42 | 42 | }, |
| 43 | - 'validation_groups' => function (Options $options) { |
|
| 43 | + 'validation_groups' => function(Options $options) { |
|
| 44 | 44 | return [Constraint::DEFAULT_GROUP, 'lug.'.$options['resource']->getName()]; |
| 45 | 45 | }, |
| 46 | - 'empty_data' => function (FormInterface $form) { |
|
| 46 | + 'empty_data' => function(FormInterface $form) { |
|
| 47 | 47 | return $form->isRequired() || !$form->isEmpty() |
| 48 | 48 | ? $form->getConfig()->getOption('factory')->create() |
| 49 | 49 | : null; |
@@ -32,13 +32,13 @@ |
||
| 32 | 32 | ->setRequired('resource') |
| 33 | 33 | ->setAllowedTypes('resource', ResourceInterface::class) |
| 34 | 34 | ->setDefaults([ |
| 35 | - 'class' => function (Options $options) { |
|
| 35 | + 'class' => function(Options $options) { |
|
| 36 | 36 | return $options['resource']->getModel(); |
| 37 | 37 | }, |
| 38 | - 'choice_value' => function (Options $options) { |
|
| 38 | + 'choice_value' => function(Options $options) { |
|
| 39 | 39 | return $options['resource']->getIdPropertyPath(); |
| 40 | 40 | }, |
| 41 | - 'choice_label' => function (Options $options) { |
|
| 41 | + 'choice_label' => function(Options $options) { |
|
| 42 | 42 | return $options['resource']->getLabelPropertyPath(); |
| 43 | 43 | }, |
| 44 | 44 | 'placeholder' => '', |
@@ -53,7 +53,7 @@ |
||
| 53 | 53 | */ |
| 54 | 54 | private function getResource($resource, array &$criteria) |
| 55 | 55 | { |
| 56 | - array_walk_recursive($criteria, function (&$value) { |
|
| 56 | + array_walk_recursive($criteria, function(&$value) { |
|
| 57 | 57 | if ($value === 'yes') { |
| 58 | 58 | $value = true; |
| 59 | 59 | } elseif ($value === 'no') { |
@@ -243,7 +243,7 @@ |
||
| 243 | 243 | $data = $bag->get($form->getName(), []); |
| 244 | 244 | } |
| 245 | 245 | |
| 246 | - array_walk_recursive($data, function (&$value) { |
|
| 246 | + array_walk_recursive($data, function(&$value) { |
|
| 247 | 247 | if ($value === false) { |
| 248 | 248 | $value = 'false'; |
| 249 | 249 | } |