@@ -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' => '', |
@@ -90,7 +90,7 @@ discard block |
||
| 90 | 90 | $event |
| 91 | 91 | ->expects($this->once()) |
| 92 | 92 | ->method('setView') |
| 93 | - ->with($this->callback(function (View $view) use ($form) { |
|
| 93 | + ->with($this->callback(function(View $view) use ($form) { |
|
| 94 | 94 | return $view->getData() === $form && $view->getStatusCode() === null; |
| 95 | 95 | })); |
| 96 | 96 | |
@@ -139,7 +139,7 @@ discard block |
||
| 139 | 139 | $event |
| 140 | 140 | ->expects($this->once()) |
| 141 | 141 | ->method('setView') |
| 142 | - ->with($this->callback(function (View $view) use ($route, $routeParameters) { |
|
| 142 | + ->with($this->callback(function(View $view) use ($route, $routeParameters) { |
|
| 143 | 143 | return $view->getStatusCode() === Response::HTTP_FOUND |
| 144 | 144 | && $view->getRoute() === $route |
| 145 | 145 | && $view->getRouteParameters() === $routeParameters; |
@@ -169,7 +169,7 @@ discard block |
||
| 169 | 169 | $event |
| 170 | 170 | ->expects($this->once()) |
| 171 | 171 | ->method('setView') |
| 172 | - ->with($this->callback(function (View $view) use ($route) { |
|
| 172 | + ->with($this->callback(function(View $view) use ($route) { |
|
| 173 | 173 | return $view->getRoute() === $route && $view->getRouteParameters() === []; |
| 174 | 174 | })); |
| 175 | 175 | |
@@ -200,7 +200,7 @@ |
||
| 200 | 200 | ->method('createRepresentation') |
| 201 | 201 | ->with( |
| 202 | 202 | $this->identicalTo($pagerfanta), |
| 203 | - $this->callback(function ($config) use ($route, $routeParameters, $queryParameters) { |
|
| 203 | + $this->callback(function($config) use ($route, $routeParameters, $queryParameters) { |
|
| 204 | 204 | return $config instanceof Route |
| 205 | 205 | && $config->getName() === $route |
| 206 | 206 | && $config->getParameters() === array_merge($routeParameters, $queryParameters); |
@@ -316,7 +316,7 @@ |
||
| 316 | 316 | } |
| 317 | 317 | |
| 318 | 318 | /** |
| 319 | - * @return \PHPUnit_Framework_MockObject_MockObject|ViewEvent |
|
| 319 | + * @return ViewEvent |
|
| 320 | 320 | */ |
| 321 | 321 | private function createViewEventMock() |
| 322 | 322 | { |
@@ -63,7 +63,7 @@ |
||
| 63 | 63 | ->method('addMethodCall') |
| 64 | 64 | ->with( |
| 65 | 65 | $this->identicalTo('offsetSet'), |
| 66 | - $this->callback(function (array $args) use ($manager, $resource) { |
|
| 66 | + $this->callback(function(array $args) use ($manager, $resource) { |
|
| 67 | 67 | return isset($args[0]) |
| 68 | 68 | && isset($args[1]) |
| 69 | 69 | && $args[0] === $resource |
@@ -107,7 +107,7 @@ |
||
| 107 | 107 | } |
| 108 | 108 | |
| 109 | 109 | /** |
| 110 | - * @return \PHPUnit_Framework_MockObject_MockObject|ContainerBuilder |
|
| 110 | + * @return ContainerBuilder |
|
| 111 | 111 | */ |
| 112 | 112 | private function createContainerBuilderMock() |
| 113 | 113 | { |
@@ -63,7 +63,7 @@ |
||
| 63 | 63 | ->method('addMethodCall') |
| 64 | 64 | ->with( |
| 65 | 65 | $this->identicalTo('offsetSet'), |
| 66 | - $this->callback(function (array $args) use ($domainManager, $resource) { |
|
| 66 | + $this->callback(function(array $args) use ($domainManager, $resource) { |
|
| 67 | 67 | return isset($args[0]) |
| 68 | 68 | && isset($args[1]) |
| 69 | 69 | && $args[0] === $resource |
@@ -107,7 +107,7 @@ |
||
| 107 | 107 | } |
| 108 | 108 | |
| 109 | 109 | /** |
| 110 | - * @return \PHPUnit_Framework_MockObject_MockObject|ContainerBuilder |
|
| 110 | + * @return ContainerBuilder |
|
| 111 | 111 | */ |
| 112 | 112 | private function createContainerBuilderMock() |
| 113 | 113 | { |
@@ -72,7 +72,7 @@ |
||
| 72 | 72 | ->method('addMethodCall') |
| 73 | 73 | ->with( |
| 74 | 74 | $this->identicalTo('offsetSet'), |
| 75 | - $this->callback(function (array $args) use ($name, $resource) { |
|
| 75 | + $this->callback(function(array $args) use ($name, $resource) { |
|
| 76 | 76 | return isset($args[0]) |
| 77 | 77 | && isset($args[1]) |
| 78 | 78 | && $args[0] === $name |
@@ -68,7 +68,7 @@ discard block |
||
| 68 | 68 | $definition |
| 69 | 69 | ->expects($this->once()) |
| 70 | 70 | ->method('setConfigurator') |
| 71 | - ->with($this->callback(function (array $configurator) { |
|
| 71 | + ->with($this->callback(function(array $configurator) { |
|
| 72 | 72 | return isset($configurator[0]) |
| 73 | 73 | && isset($configurator[1]) |
| 74 | 74 | && $configurator[0] instanceof Reference |
@@ -117,7 +117,7 @@ discard block |
||
| 117 | 117 | $definition |
| 118 | 118 | ->expects($this->once()) |
| 119 | 119 | ->method('setConfigurator') |
| 120 | - ->with($this->callback(function (array $configurator) { |
|
| 120 | + ->with($this->callback(function(array $configurator) { |
|
| 121 | 121 | return isset($configurator[0]) |
| 122 | 122 | && isset($configurator[1]) |
| 123 | 123 | && $configurator[0] instanceof Reference |
@@ -63,7 +63,7 @@ |
||
| 63 | 63 | ->method('addMethodCall') |
| 64 | 64 | ->with( |
| 65 | 65 | $this->identicalTo('offsetSet'), |
| 66 | - $this->callback(function (array $args) use ($repository, $resource) { |
|
| 66 | + $this->callback(function(array $args) use ($repository, $resource) { |
|
| 67 | 67 | return isset($args[0]) |
| 68 | 68 | && isset($args[1]) |
| 69 | 69 | && $args[0] === $resource |
@@ -107,7 +107,7 @@ |
||
| 107 | 107 | } |
| 108 | 108 | |
| 109 | 109 | /** |
| 110 | - * @return \PHPUnit_Framework_MockObject_MockObject|ContainerBuilder |
|
| 110 | + * @return ContainerBuilder |
|
| 111 | 111 | */ |
| 112 | 112 | private function createContainerBuilderMock() |
| 113 | 113 | { |