@@ -45,7 +45,7 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
182 | 182 | { |
183 | 183 | return self::DEFAULT_SERVICE_PREFIX . $this->getClassName( |
184 | 184 | $file->getFilename() |
185 | - ); |
|
185 | + ); |
|
186 | 186 | } |
187 | 187 | |
188 | 188 | } |