Completed
Push — master ( 19732d...076741 )
by Paweł
11:47
created
src/SWP/Bundle/CoreBundle/Twig/StringyExtension.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
         $this->initialized = true;
89 89
         $stringyClass = new \ReflectionClass('Stringy\Stringy');
90 90
         $methods = $stringyClass->getMethods(\ReflectionMethod::IS_PUBLIC);
91
-        $names = array_map(function ($value) {
91
+        $names = array_map(function($value) {
92 92
             return $value->getName();
93 93
         }, $methods);
94 94
 
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
                 if (array_key_exists($name, $this->environment->getFunctions())) {
106 106
                     continue;
107 107
                 }
108
-                $this->functions[$name] = new \Twig_SimpleFunction($name, function () use ($name) {
108
+                $this->functions[$name] = new \Twig_SimpleFunction($name, function() use ($name) {
109 109
                     return call_user_func_array(['Stringy\StaticStringy', $name], func_get_args());
110 110
                 });
111 111
             } else {
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
                 if (array_key_exists($name, $this->environment->getFilters())) {
114 114
                     continue;
115 115
                 }
116
-                $this->filters[$name] = new \Twig_SimpleFilter($name, function () use ($name) {
116
+                $this->filters[$name] = new \Twig_SimpleFilter($name, function() use ($name) {
117 117
                     return (string) call_user_func_array(['Stringy\StaticStringy', $name], func_get_args());
118 118
                 });
119 119
             }
Please login to merge, or discard this patch.
src/SWP/Component/TemplatesSystem/Twig/Extension/GimmeExtension.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -76,22 +76,22 @@
 block discarded – undo
76 76
     public function getFilters()
77 77
     {
78 78
         return [
79
-            new \Twig_SimpleFilter('start', function ($node, $value) {
79
+            new \Twig_SimpleFilter('start', function($node, $value) {
80 80
                 $node['_collection_type_filters']['start'] = $value;
81 81
 
82 82
                 return $node;
83 83
             }, ['needs_context' => false]),
84
-            new \Twig_SimpleFilter('limit', function ($node, $value) {
84
+            new \Twig_SimpleFilter('limit', function($node, $value) {
85 85
                 $node['_collection_type_filters']['limit'] = $value;
86 86
 
87 87
                 return $node;
88 88
             }, ['needs_context' => false]),
89
-            new \Twig_SimpleFilter('order', function ($node, $value1, $value2) {
89
+            new \Twig_SimpleFilter('order', function($node, $value1, $value2) {
90 90
                 $node['_collection_type_filters']['order'] = [$value1, $value2];
91 91
 
92 92
                 return $node;
93 93
             }, ['needs_context' => false]),
94
-            new \Twig_SimpleFilter('dateRange', function ($node, $value1, $value2) {
94
+            new \Twig_SimpleFilter('dateRange', function($node, $value1, $value2) {
95 95
                 $node['_collection_type_filters']['date_range'] = [$value1, $value2];
96 96
 
97 97
                 return $node;
Please login to merge, or discard this patch.
src/SWP/Bundle/MultiTenancyBundle/Command/CreateOrganizationCommand.php 2 patches
Doc Comments   -1 removed lines patch added patch discarded remove patch
@@ -129,7 +129,6 @@
 block discarded – undo
129 129
 
130 130
     /**
131 131
      * @param string $name
132
-     * @param bool   $disabled
133 132
      *
134 133
      * @return OrganizationInterface
135 134
      */
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -111,7 +111,7 @@
 block discarded – undo
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
                 }
Please login to merge, or discard this patch.
src/SWP/Bundle/ContentBundle/Hydrator/ArticleHydrator.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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();
Please login to merge, or discard this patch.
src/SWP/Bundle/ContentBundle/Factory/ORM/MediaFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -109,7 +109,7 @@
 block discarded – undo
109 109
         }
110 110
 
111 111
         $originalRendition = $item->getRenditions()->filter(
112
-            function (RenditionInterface $rendition) {
112
+            function(RenditionInterface $rendition) {
113 113
                 return 'original' === $rendition->getName();
114 114
             }
115 115
         )->first();
Please login to merge, or discard this patch.
src/SWP/Bundle/OutputChannelBundle/Form/Type/OutputChannelType.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
             ])
42 42
         ;
43 43
 
44
-        $formModifier = function (FormInterface $form, ?string $type) {
44
+        $formModifier = function(FormInterface $form, ?string $type) {
45 45
             if (OutputChannelInterface::TYPE_WORDPRESS === $type) {
46 46
                 $form->add('config', WordpressOutputChannelConfigType::class);
47 47
             }
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
 
50 50
         $builder->addEventListener(
51 51
             FormEvents::POST_SET_DATA,
52
-            function (FormEvent $event) use ($formModifier) {
52
+            function(FormEvent $event) use ($formModifier) {
53 53
                 $data = $event->getData();
54 54
                 if (null !== $event->getData()) {
55 55
                     $formModifier($event->getForm(), $data->getType());
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
 
60 60
         $builder->get('type')->addEventListener(
61 61
             FormEvents::POST_SUBMIT,
62
-            function (FormEvent $event) use ($formModifier) {
62
+            function(FormEvent $event) use ($formModifier) {
63 63
                 $type = $event->getForm()->getData();
64 64
 
65 65
                 $formModifier($event->getForm()->getParent(), $type);
Please login to merge, or discard this patch.
src/SWP/Bundle/MultiTenancyBundle/Form/Type/TenantChoiceType.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@
 block discarded – undo
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',
Please login to merge, or discard this patch.
src/SWP/Bundle/CoreBundle/Theme/Installer/TenantAwareThemeInstaller.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -108,7 +108,7 @@
 block discarded – undo
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
         );
Please login to merge, or discard this patch.
src/SWP/Bundle/CoreBundle/Matcher/RulesMatcher.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -138,7 +138,7 @@
 block discarded – undo
138 138
 
139 139
         $ids = array_column($rules['tenants'], 'tenant');
140 140
         $ids = array_unique($ids);
141
-        $tenants = array_filter($rules['tenants'], function ($key, $value) use ($ids) {
141
+        $tenants = array_filter($rules['tenants'], function($key, $value) use ($ids) {
142 142
             return \in_array($value, \array_keys($ids));
143 143
         }, ARRAY_FILTER_USE_BOTH);
144 144
 
Please login to merge, or discard this patch.