Passed
Push — develop ( e43f13...042e9e )
by Mathieu
03:00 queued 16s
created
src/Admin/AnnotationAdmin.php 1 patch
Indentation   +37 added lines, -37 removed lines patch added patch discarded remove patch
@@ -117,15 +117,15 @@  discard block
 block discarded – undo
117 117
      *                                                     reader.
118 118
      */
119 119
     public function __construct(
120
-      ActionButtonReader $actionButtonReader,
121
-      DatagridReader $datagridReader,
122
-      DatagridValuesReader $datagridValuesReader,
123
-      DashboardActionReader $dashboardActionReader,
124
-      ExportReader $exportReader,
125
-      FormReader $formReader,
126
-      ListReader $listReader,
127
-      RouteReader $routeReader,
128
-      ShowReader $showReader
120
+        ActionButtonReader $actionButtonReader,
121
+        DatagridReader $datagridReader,
122
+        DatagridValuesReader $datagridValuesReader,
123
+        DashboardActionReader $dashboardActionReader,
124
+        ExportReader $exportReader,
125
+        FormReader $formReader,
126
+        ListReader $listReader,
127
+        RouteReader $routeReader,
128
+        ShowReader $showReader
129 129
     ) {
130 130
         parent::__construct();
131 131
 
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
     public function getExportFormats(): array
150 150
     {
151 151
         return $this->exportReader->getFormats(
152
-          $this->getReflectionClass()
152
+            $this->getReflectionClass()
153 153
         ) ?: parent::getExportFormats();
154 154
     }
155 155
 
@@ -164,19 +164,19 @@  discard block
 block discarded – undo
164 164
      * @throws ReflectionException
165 165
      */
166 166
     protected function configureActionButtons(
167
-      array $buttonList,
168
-      string $action,
167
+        array $buttonList,
168
+        string $action,
169 169
       ?object $object = null
170 170
     ): array {
171 171
         return $this->actionButtonReader
172
-          ->getActions(
172
+            ->getActions(
173 173
             $this->getReflectionClass(),
174 174
             parent::configureActionButtons(
175
-              $buttonList,
176
-              $action,
177
-              $object
175
+                $buttonList,
176
+                $action,
177
+                $object
178 178
             )
179
-          );
179
+            );
180 180
     }
181 181
 
182 182
     /**
@@ -190,10 +190,10 @@  discard block
 block discarded – undo
190 190
     protected function configureDashboardActions(array $actions): array
191 191
     {
192 192
         return $this->dashboardActionReader
193
-          ->getActions(
193
+            ->getActions(
194 194
             $this->getReflectionClass(),
195 195
             parent::configureDashboardActions($actions)
196
-          );
196
+            );
197 197
     }
198 198
 
199 199
     /**
@@ -207,8 +207,8 @@  discard block
 block discarded – undo
207 207
     protected function configureDatagridFilters(DatagridMapper $filter): void
208 208
     {
209 209
         $this->datagridReader->configureFields(
210
-          $this->getReflectionClass(),
211
-          $filter
210
+            $this->getReflectionClass(),
211
+            $filter
212 212
         );
213 213
     }
214 214
 
@@ -221,7 +221,7 @@  discard block
 block discarded – undo
221 221
     protected function configureExportFields(): array
222 222
     {
223 223
         return $this->exportReader->getFields(
224
-          $this->getReflectionClass()
224
+            $this->getReflectionClass()
225 225
         ) ?: parent::getExportFields();
226 226
     }
227 227
 
@@ -237,15 +237,15 @@  discard block
 block discarded – undo
237 237
     {
238 238
         if ($this->getRequest()->get($this->getIdParameter())) {
239 239
             $this->formReader->configureEditFields(
240
-              $this->getReflectionClass(),
241
-              $form
240
+                $this->getReflectionClass(),
241
+                $form
242 242
             );
243 243
             return;
244 244
         }
245 245
 
246 246
         $this->formReader->configureCreateFields(
247
-          $this->getReflectionClass(),
248
-          $form
247
+            $this->getReflectionClass(),
248
+            $form
249 249
         );
250 250
     }
251 251
 
@@ -260,10 +260,10 @@  discard block
 block discarded – undo
260 260
     protected function configureListFields(ListMapper $list): void
261 261
     {
262 262
         $this->listReader
263
-          ->configureFields(
263
+            ->configureFields(
264 264
             $this->getReflectionClass(),
265 265
             $list
266
-          );
266
+            );
267 267
     }
268 268
 
269 269
     /**
@@ -277,16 +277,16 @@  discard block
 block discarded – undo
277 277
     protected function configureRoutes(RouteCollectionInterface $collection
278 278
     ): void {
279 279
         [$addRoutes, $removeRoutes] = $this->routeReader->getRoutes(
280
-          $this->getReflectionClass()
280
+            $this->getReflectionClass()
281 281
         );
282 282
 
283 283
         /** @var AddRoute $route */
284 284
         foreach ($addRoutes as $route) {
285 285
             $collection->add(
286
-              $route->getName(),
287
-              $route->path ? $this->replaceIdParameterInRoutePath(
286
+                $route->getName(),
287
+                $route->path ? $this->replaceIdParameterInRoutePath(
288 288
                 $route->path
289
-              ) : $route->getName()
289
+                ) : $route->getName()
290 290
             );
291 291
         }
292 292
 
@@ -307,8 +307,8 @@  discard block
 block discarded – undo
307 307
     protected function configureShowFields(ShowMapper $show): void
308 308
     {
309 309
         $this->showReader->configureFields(
310
-          $this->getReflectionClass(),
311
-          $show
310
+            $this->getReflectionClass(),
311
+            $show
312 312
         );
313 313
     }
314 314
 
@@ -323,9 +323,9 @@  discard block
 block discarded – undo
323 323
     private function replaceIdParameterInRoutePath(string $path): string
324 324
     {
325 325
         return str_replace(
326
-          AddRoute::ID_PARAMETER,
327
-          $this->getRouterIdParameter(),
328
-          $path
326
+            AddRoute::ID_PARAMETER,
327
+            $this->getRouterIdParameter(),
328
+            $path
329 329
         );
330 330
     }
331 331
 
Please login to merge, or discard this patch.
src/DependencyInjection/Compiler/AutoRegisterCompilerPass.php 1 patch
Indentation   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
     {
46 46
         $this->annotationReader = $container->get('annotation_reader');
47 47
         $files = $this->findFiles(
48
-          $container->getParameter('sonata_annotation.directory')
48
+            $container->getParameter('sonata_annotation.directory')
49 49
         );
50 50
 
51 51
         foreach ($files as $file) {
@@ -58,14 +58,14 @@  discard block
 block discarded – undo
58 58
             }
59 59
 
60 60
             if (!($annotation = $this->getClassAnnotation(
61
-              new ReflectionClass($className)
61
+                new ReflectionClass($className)
62 62
             ))) {
63 63
                 continue;
64 64
             }
65 65
 
66 66
             $definition = new Definition(
67
-              $annotation->admin,
68
-              [
67
+                $annotation->admin,
68
+                [
69 69
                 new Reference('sonata.annotation.reader.action_button'),
70 70
                 new Reference('sonata.annotation.reader.datagrid'),
71 71
                 new Reference('sonata.annotation.reader.datagrid_values'),
@@ -75,20 +75,20 @@  discard block
 block discarded – undo
75 75
                 new Reference('sonata.annotation.reader.list'),
76 76
                 new Reference('sonata.annotation.reader.route'),
77 77
                 new Reference('sonata.annotation.reader.show'),
78
-              ]
78
+                ]
79 79
             );
80 80
 
81 81
             $definition->addTag(
82
-              'sonata.admin',
83
-              array_merge(
82
+                'sonata.admin',
83
+                array_merge(
84 84
                 $annotation->getTagOptions(),
85 85
                 ['model_class' => $className],
86
-              )
86
+                )
87 87
             );
88 88
 
89 89
             $container->setDefinition(
90
-              $annotation->serviceId ?? $this->getServiceId($file),
91
-              $definition
90
+                $annotation->serviceId ?? $this->getServiceId($file),
91
+                $definition
92 92
             );
93 93
         }
94 94
     }
@@ -103,9 +103,9 @@  discard block
 block discarded – undo
103 103
     private function findFiles(string $directory): IteratorAggregate
104 104
     {
105 105
         return Finder::create()
106
-          ->in($directory)
107
-          ->files()
108
-          ->name('*.php');
106
+            ->in($directory)
107
+            ->files()
108
+            ->name('*.php');
109 109
     }
110 110
 
111 111
     /**
@@ -166,8 +166,8 @@  discard block
 block discarded – undo
166 166
     private function getClassAnnotation(ReflectionClass $class): ?Admin
167 167
     {
168 168
         return $this->annotationReader->getClassAnnotation(
169
-          $class,
170
-          Admin::class
169
+            $class,
170
+            Admin::class
171 171
         );
172 172
     }
173 173
 
@@ -182,7 +182,7 @@  discard block
 block discarded – undo
182 182
     {
183 183
         return self::DEFAULT_SERVICE_PREFIX . $this->getClassName(
184 184
             $file->getFilename()
185
-          );
185
+            );
186 186
     }
187 187
 
188 188
 }
Please login to merge, or discard this patch.