@@ -196,7 +196,7 @@ |
||
| 196 | 196 | */ |
| 197 | 197 | private function getArrayOfIdsFromRoutesArray(array $routes): array |
| 198 | 198 | { |
| 199 | - return array_map(function ($route) { |
|
| 199 | + return array_map(function($route) { |
|
| 200 | 200 | return $route->getId(); |
| 201 | 201 | }, $routes); |
| 202 | 202 | } |
@@ -28,7 +28,7 @@ discard block |
||
| 28 | 28 | ]) |
| 29 | 29 | ; |
| 30 | 30 | |
| 31 | - $formModifier = function (FormInterface $form, ?string $type) { |
|
| 31 | + $formModifier = function(FormInterface $form, ?string $type) { |
|
| 32 | 32 | if (OutputChannelInterface::TYPE_WORDPRESS === $type) { |
| 33 | 33 | $form->add('config', WordpressOutputChannelConfigType::class); |
| 34 | 34 | } |
@@ -36,7 +36,7 @@ discard block |
||
| 36 | 36 | |
| 37 | 37 | $builder->addEventListener( |
| 38 | 38 | FormEvents::POST_SET_DATA, |
| 39 | - function (FormEvent $event) use ($formModifier) { |
|
| 39 | + function(FormEvent $event) use ($formModifier) { |
|
| 40 | 40 | $data = $event->getData(); |
| 41 | 41 | if (null !== $event->getData()) { |
| 42 | 42 | $formModifier($event->getForm(), $data->getType()); |
@@ -46,7 +46,7 @@ discard block |
||
| 46 | 46 | |
| 47 | 47 | $builder->get('type')->addEventListener( |
| 48 | 48 | FormEvents::POST_SUBMIT, |
| 49 | - function (FormEvent $event) use ($formModifier) { |
|
| 49 | + function(FormEvent $event) use ($formModifier) { |
|
| 50 | 50 | $type = $event->getForm()->getData(); |
| 51 | 51 | |
| 52 | 52 | $formModifier($event->getForm()->getParent(), $type); |
@@ -111,7 +111,7 @@ |
||
| 111 | 111 | { |
| 112 | 112 | if (!$input->getArgument($name)) { |
| 113 | 113 | $question = new Question(sprintf('<question>Please enter %s:</question>', $name)); |
| 114 | - $question->setValidator(function ($argument) use ($name) { |
|
| 114 | + $question->setValidator(function($argument) use ($name) { |
|
| 115 | 115 | if (empty($argument)) { |
| 116 | 116 | throw new \RuntimeException(sprintf('The %s can not be empty', $name)); |
| 117 | 117 | } |
@@ -64,10 +64,10 @@ |
||
| 64 | 64 | |
| 65 | 65 | $builder->get('filters') |
| 66 | 66 | ->addModelTransformer(new CallbackTransformer( |
| 67 | - function ($value) { |
|
| 67 | + function($value) { |
|
| 68 | 68 | return json_encode($value); |
| 69 | 69 | }, |
| 70 | - function ($value) { |
|
| 70 | + function($value) { |
|
| 71 | 71 | if (is_array($value)) { |
| 72 | 72 | return $value; |
| 73 | 73 | } |
@@ -76,7 +76,7 @@ discard block |
||
| 76 | 76 | ->scalarNode('value') |
| 77 | 77 | ->beforeNormalization() |
| 78 | 78 | ->ifArray() |
| 79 | - ->then(function ($value) { |
|
| 79 | + ->then(function($value) { |
|
| 80 | 80 | return json_encode($value); |
| 81 | 81 | }) |
| 82 | 82 | ->end() |
@@ -85,7 +85,7 @@ discard block |
||
| 85 | 85 | ->scalarNode('type') |
| 86 | 86 | ->defaultValue('string') |
| 87 | 87 | ->validate() |
| 88 | - ->always(function ($v) { |
|
| 88 | + ->always(function($v) { |
|
| 89 | 89 | if (!in_array($v, ['string', 'array', 'boolean'])) { |
| 90 | 90 | throw new InvalidTypeException(); |
| 91 | 91 | } |
@@ -40,10 +40,10 @@ |
||
| 40 | 40 | ; |
| 41 | 41 | |
| 42 | 42 | $builder->get('value')->addModelTransformer(new CallbackTransformer( |
| 43 | - function ($value) { |
|
| 43 | + function($value) { |
|
| 44 | 44 | return $value; |
| 45 | 45 | }, |
| 46 | - function ($value) { |
|
| 46 | + function($value) { |
|
| 47 | 47 | $allowed = ['true', 'false', '1', '0', null]; |
| 48 | 48 | |
| 49 | 49 | if (\is_bool($value) || \in_array($value, $allowed, true)) { |
@@ -108,7 +108,7 @@ |
||
| 108 | 108 | { |
| 109 | 109 | $themes = \array_filter( |
| 110 | 110 | $this->themeLoader->load(), |
| 111 | - function ($element) use (&$themeName) { |
|
| 111 | + function($element) use (&$themeName) { |
|
| 112 | 112 | return $element->getName() === $themeName; |
| 113 | 113 | } |
| 114 | 114 | ); |
@@ -57,7 +57,7 @@ |
||
| 57 | 57 | public function configureOptions(OptionsResolver $resolver) |
| 58 | 58 | { |
| 59 | 59 | $resolver->setDefaults([ |
| 60 | - 'choices' => function (Options $options) { |
|
| 60 | + 'choices' => function(Options $options) { |
|
| 61 | 61 | return $this->tenantRepository->findAll(); |
| 62 | 62 | }, |
| 63 | 63 | 'choice_value' => 'code', |
@@ -91,7 +91,7 @@ discard block |
||
| 91 | 91 | $items = $this->filterTextItems($package->getItems()); |
| 92 | 92 | |
| 93 | 93 | $map = $items->map( |
| 94 | - function (ItemInterface $item) { |
|
| 94 | + function(ItemInterface $item) { |
|
| 95 | 95 | return ' '.$item->getDescription(); |
| 96 | 96 | } |
| 97 | 97 | ); |
@@ -111,7 +111,7 @@ discard block |
||
| 111 | 111 | { |
| 112 | 112 | $items = $this->filterTextItems($package->getItems()); |
| 113 | 113 | |
| 114 | - $authors = array_filter(array_values(array_map(function (ItemInterface $item) { |
|
| 114 | + $authors = array_filter(array_values(array_map(function(ItemInterface $item) { |
|
| 115 | 115 | $metadata = $item->getMetadata(); |
| 116 | 116 | |
| 117 | 117 | return $metadata['byline']; |
@@ -132,7 +132,7 @@ discard block |
||
| 132 | 132 | private function filterTextItems(Collection $items) |
| 133 | 133 | { |
| 134 | 134 | return $items->filter( |
| 135 | - function (ItemInterface $item) { |
|
| 135 | + function(ItemInterface $item) { |
|
| 136 | 136 | $this->ensureTypeIsAllowed($item->getType()); |
| 137 | 137 | |
| 138 | 138 | return ItemInterface::TYPE_TEXT === $item->getType(); |
@@ -147,7 +147,7 @@ discard block |
||
| 147 | 147 | */ |
| 148 | 148 | private function populateBody(PackageInterface $package) |
| 149 | 149 | { |
| 150 | - return $package->getBody().' '.implode('', array_map(function (ItemInterface $item) { |
|
| 150 | + return $package->getBody().' '.implode('', array_map(function(ItemInterface $item) { |
|
| 151 | 151 | $this->ensureTypeIsAllowed($item->getType()); |
| 152 | 152 | |
| 153 | 153 | return $item->getBody(); |