Passed
Push — develop ( 5fca67...c0109d )
by Mathieu
02:57
created
src/Reader/ShowReader.php 1 patch
Indentation   +27 added lines, -27 removed lines patch added patch discarded remove patch
@@ -35,8 +35,8 @@  discard block
 block discarded – undo
35 35
      * @return void
36 36
      */
37 37
     public function configureFields(
38
-      ReflectionClass $class,
39
-      ShowMapper $showMapper
38
+        ReflectionClass $class,
39
+        ShowMapper $showMapper
40 40
     ): void {
41 41
         $propertiesAndMethodsWithPosition = [];
42 42
         $propertiesAndMethodsWithoutPosition = [];
@@ -56,8 +56,8 @@  discard block
 block discarded – undo
56 56
                 if ($annotation instanceof ShowAssociationField) {
57 57
                     if (!isset($annotation->field)) {
58 58
                         throw new MissingAnnotationArgumentException(
59
-                          $annotation,
60
-                          'field',
59
+                            $annotation,
60
+                            'field',
61 61
                         );
62 62
                     }
63 63
 
@@ -66,30 +66,30 @@  discard block
 block discarded – undo
66 66
 
67 67
                 if (!isset($annotation->position)) {
68 68
                     $propertiesAndMethodsWithoutPosition[] = [
69
-                      'name' => $name,
70
-                      'settings' => $annotation->getSettings(),
69
+                        'name' => $name,
70
+                        'settings' => $annotation->getSettings(),
71 71
                     ];
72 72
 
73 73
                     continue;
74 74
                 }
75 75
 
76 76
                 if (array_key_exists(
77
-                  $annotation->position,
78
-                  $propertiesAndMethodsWithPosition
77
+                    $annotation->position,
78
+                    $propertiesAndMethodsWithPosition
79 79
                 )) {
80 80
                     throw new InvalidArgumentException(
81
-                      sprintf(
81
+                        sprintf(
82 82
                         'Position "%s" is already in use by "%s", try setting a different position for "%s".',
83 83
                         $annotation->position,
84 84
                         $propertiesAndMethodsWithPosition[$annotation->position]['name'],
85 85
                         $property->getName()
86
-                      )
86
+                        )
87 87
                     );
88 88
                 }
89 89
 
90 90
                 $propertiesAndMethodsWithPosition[$annotation->position] = [
91
-                  'name' => $name,
92
-                  'settings' => $annotation->getSettings(),
91
+                    'name' => $name,
92
+                    'settings' => $annotation->getSettings(),
93 93
                 ];
94 94
             }
95 95
         }
@@ -101,37 +101,37 @@  discard block
 block discarded – undo
101 101
         foreach ($class->getMethods() as $method) {
102 102
             /** @var ShowField|null $annotation */
103 103
             if ($annotation = $this->getMethodAnnotation(
104
-              $method,
105
-              ShowField::class
104
+                $method,
105
+                ShowField::class
106 106
             )) {
107 107
                 $name = $method->getName();
108 108
 
109 109
                 if (!isset($annotation->position)) {
110 110
                     $propertiesAndMethodsWithoutPosition[] = [
111
-                      'name' => $name,
112
-                      'settings' => $annotation->getSettings(),
111
+                        'name' => $name,
112
+                        'settings' => $annotation->getSettings(),
113 113
                     ];
114 114
 
115 115
                     continue;
116 116
                 }
117 117
 
118 118
                 if (array_key_exists(
119
-                  $annotation->position,
120
-                  $propertiesAndMethodsWithPosition
119
+                    $annotation->position,
120
+                    $propertiesAndMethodsWithPosition
121 121
                 )) {
122 122
                     throw new InvalidArgumentException(
123
-                      sprintf(
123
+                        sprintf(
124 124
                         'Position "%s" is already in use by "%s", try setting a different position for "%s".',
125 125
                         $annotation->position,
126 126
                         $propertiesAndMethodsWithPosition[$annotation->position]['name'],
127 127
                         $name
128
-                      )
128
+                        )
129 129
                     );
130 130
                 }
131 131
 
132 132
                 $propertiesAndMethodsWithPosition[$annotation->position] = [
133
-                  'name' => $name,
134
-                  'settings' => $annotation->getSettings(),
133
+                    'name' => $name,
134
+                    'settings' => $annotation->getSettings(),
135 135
                 ];
136 136
             }
137 137
         }
@@ -143,15 +143,15 @@  discard block
 block discarded – undo
143 143
         ksort($propertiesAndMethodsWithPosition);
144 144
 
145 145
         $propertiesAndMethods = array_merge(
146
-          $propertiesAndMethodsWithPosition,
147
-          $propertiesAndMethodsWithoutPosition
146
+            $propertiesAndMethodsWithPosition,
147
+            $propertiesAndMethodsWithoutPosition
148 148
         );
149 149
 
150 150
         foreach ($propertiesAndMethods as $propertyAndMethod) {
151 151
             $showMapper->add(
152
-              $propertyAndMethod['name'],
153
-              ...
154
-              $propertyAndMethod['settings']
152
+                $propertyAndMethod['name'],
153
+                ...
154
+                $propertyAndMethod['settings']
155 155
             );
156 156
         }
157 157
     }
Please login to merge, or discard this patch.
src/Reader/AnnotationReaderTrait.php 1 patch
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -45,8 +45,8 @@  discard block
 block discarded – undo
45 45
      * @return object|AnnotationInterface|null
46 46
      */
47 47
     protected function getClassAnnotation(
48
-      ReflectionClass $class,
49
-      string $annotation
48
+        ReflectionClass $class,
49
+        string $annotation
50 50
     ): ?object {
51 51
         return $this->annotationReader->getClassAnnotation($class, $annotation);
52 52
     }
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
      * @return array<object|AnnotationInterface>
72 72
      */
73 73
     protected function getPropertyAnnotations(
74
-      ReflectionProperty $property
74
+        ReflectionProperty $property
75 75
     ): array {
76 76
         return $this->annotationReader->getPropertyAnnotations($property);
77 77
     }
@@ -85,12 +85,12 @@  discard block
 block discarded – undo
85 85
      * @return object|AnnotationInterface|null
86 86
      */
87 87
     protected function getMethodAnnotation(
88
-      ReflectionMethod $method,
89
-      string $annotation
88
+        ReflectionMethod $method,
89
+        string $annotation
90 90
     ): ?object {
91 91
         return $this->annotationReader->getMethodAnnotation(
92
-          $method,
93
-          $annotation
92
+            $method,
93
+            $annotation
94 94
         );
95 95
     }
96 96
 
Please login to merge, or discard this patch.
src/Reader/DatagridReader.php 1 patch
Indentation   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -35,8 +35,8 @@  discard block
 block discarded – undo
35 35
      * @return void
36 36
      */
37 37
     public function configureFields(
38
-      ReflectionClass $class,
39
-      DatagridMapper $datagridMapper
38
+        ReflectionClass $class,
39
+        DatagridMapper $datagridMapper
40 40
     ): void {
41 41
         $propertiesWithPosition = [];
42 42
         $propertiesWithoutPosition = [];
@@ -52,8 +52,8 @@  discard block
 block discarded – undo
52 52
                 if ($annotation instanceof DatagridAssociationField) {
53 53
                     if (!isset($annotation->field)) {
54 54
                         throw new MissingAnnotationArgumentException(
55
-                          $annotation,
56
-                          'field',
55
+                            $annotation,
56
+                            'field',
57 57
                         );
58 58
                     }
59 59
 
@@ -62,30 +62,30 @@  discard block
 block discarded – undo
62 62
 
63 63
                 if (!isset($annotation->position)) {
64 64
                     $propertiesWithoutPosition[] = [
65
-                      'name' => $name,
66
-                      'annotation' => $annotation,
65
+                        'name' => $name,
66
+                        'annotation' => $annotation,
67 67
                     ];
68 68
 
69 69
                     continue;
70 70
                 }
71 71
 
72 72
                 if (array_key_exists(
73
-                  $annotation->position,
74
-                  $propertiesWithPosition
73
+                    $annotation->position,
74
+                    $propertiesWithPosition
75 75
                 )) {
76 76
                     throw new InvalidArgumentException(
77
-                      sprintf(
77
+                        sprintf(
78 78
                         'Position "%s" is already in use by "%s", try setting a different position for "%s".',
79 79
                         $annotation->position,
80 80
                         $propertiesWithPosition[$annotation->position]['name'],
81 81
                         $property->getName()
82
-                      )
82
+                        )
83 83
                     );
84 84
                 }
85 85
 
86 86
                 $propertiesWithPosition[$annotation->position] = [
87
-                  'name' => $name,
88
-                  'annotation' => $annotation,
87
+                    'name' => $name,
88
+                    'annotation' => $annotation,
89 89
                 ];
90 90
             }
91 91
         }
@@ -93,14 +93,14 @@  discard block
 block discarded – undo
93 93
         ksort($propertiesWithPosition);
94 94
 
95 95
         $properties = array_merge(
96
-          $propertiesWithPosition,
97
-          $propertiesWithoutPosition
96
+            $propertiesWithPosition,
97
+            $propertiesWithoutPosition
98 98
         );
99 99
 
100 100
         foreach ($properties as $property) {
101 101
             $datagridMapper->add(
102
-                 $property['name'],
103
-              ...$property['annotation']->getSettings()
102
+                    $property['name'],
103
+                ...$property['annotation']->getSettings()
104 104
             );
105 105
         }
106 106
     }
Please login to merge, or discard this patch.
src/Reader/ExportReader.php 1 patch
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -37,14 +37,14 @@  discard block
 block discarded – undo
37 37
                 if ($annotation instanceof ExportAssociationField) {
38 38
                     if (!isset($annotation->field)) {
39 39
                         throw new MissingAnnotationArgumentException(
40
-                          $annotation,
41
-                          'field',
40
+                            $annotation,
41
+                            'field',
42 42
                         );
43 43
                     }
44 44
 
45 45
                     $fieldName = $property->getName()
46
-                      . '.'
47
-                      . $annotation->field;
46
+                        . '.'
47
+                        . $annotation->field;
48 48
 
49 49
                     $fields[$annotation->label ?? $fieldName] = $fieldName;
50 50
                     continue;
@@ -59,8 +59,8 @@  discard block
 block discarded – undo
59 59
 
60 60
         foreach ($class->getMethods() as $method) {
61 61
             if ($annotation = $this->getMethodAnnotation(
62
-              $method,
63
-              ExportField::class
62
+                $method,
63
+                ExportField::class
64 64
             )) {
65 65
                 $label = $annotation->label ?? $method->getName();
66 66
                 $fields[$label] = $method->getName();
@@ -81,8 +81,8 @@  discard block
 block discarded – undo
81 81
     {
82 82
         /** @var ExportFormats|null $annotation */
83 83
         if ($annotation = $this->getClassAnnotation(
84
-          $class,
85
-          ExportFormats::class
84
+            $class,
85
+            ExportFormats::class
86 86
         )) {
87 87
             return $annotation->formats;
88 88
         }
Please login to merge, or discard this patch.
src/Reader/ListReader.php 1 patch
Indentation   +34 added lines, -34 removed lines patch added patch discarded remove patch
@@ -36,8 +36,8 @@  discard block
 block discarded – undo
36 36
      * @return void
37 37
      */
38 38
     public function configureFields(
39
-      ReflectionClass $class,
40
-      ListMapper $listMapper
39
+        ReflectionClass $class,
40
+        ListMapper $listMapper
41 41
     ): void {
42 42
         $propertiesAndMethodsWithPosition = [];
43 43
         $propertiesAndMethodsWithoutPosition = [];
@@ -57,8 +57,8 @@  discard block
 block discarded – undo
57 57
                 if ($annotation instanceof ListAssociationField) {
58 58
                     if (!isset($annotation->field)) {
59 59
                         throw new MissingAnnotationArgumentException(
60
-                          $annotation,
61
-                          'field',
60
+                            $annotation,
61
+                            'field',
62 62
                         );
63 63
                     }
64 64
 
@@ -67,30 +67,30 @@  discard block
 block discarded – undo
67 67
 
68 68
                 if (!isset($annotation->position)) {
69 69
                     $propertiesAndMethodsWithoutPosition[] = [
70
-                      'name' => $name,
71
-                      'annotation' => $annotation,
70
+                        'name' => $name,
71
+                        'annotation' => $annotation,
72 72
                     ];
73 73
 
74 74
                     continue;
75 75
                 }
76 76
 
77 77
                 if (array_key_exists(
78
-                  $annotation->position,
79
-                  $propertiesAndMethodsWithPosition
78
+                    $annotation->position,
79
+                    $propertiesAndMethodsWithPosition
80 80
                 )) {
81 81
                     throw new InvalidArgumentException(
82
-                      sprintf(
82
+                        sprintf(
83 83
                         'Position "%s" is already in use by "%s", try setting a different position for "%s".',
84 84
                         $annotation->position,
85 85
                         $propertiesAndMethodsWithPosition[$annotation->position]['name'],
86 86
                         $property->getName()
87
-                      )
87
+                        )
88 88
                     );
89 89
                 }
90 90
 
91 91
                 $propertiesAndMethodsWithPosition[$annotation->position] = [
92
-                  'name' => $name,
93
-                  'annotation' => $annotation,
92
+                    'name' => $name,
93
+                    'annotation' => $annotation,
94 94
                 ];
95 95
             }
96 96
         }
@@ -102,37 +102,37 @@  discard block
 block discarded – undo
102 102
         foreach ($class->getMethods() as $method) {
103 103
             /** @var ListField|null $annotation */
104 104
             if ($annotation = $this->getMethodAnnotation(
105
-              $method,
106
-              ListField::class
105
+                $method,
106
+                ListField::class
107 107
             )) {
108 108
                 $name = $method->getName();
109 109
 
110 110
                 if (!isset($annotation->position)) {
111 111
                     $propertiesAndMethodsWithoutPosition[] = [
112
-                      'name' => $name,
113
-                      'annotation' => $annotation,
112
+                        'name' => $name,
113
+                        'annotation' => $annotation,
114 114
                     ];
115 115
 
116 116
                     continue;
117 117
                 }
118 118
 
119 119
                 if (array_key_exists(
120
-                  $annotation->position,
121
-                  $propertiesAndMethodsWithPosition
120
+                    $annotation->position,
121
+                    $propertiesAndMethodsWithPosition
122 122
                 )) {
123 123
                     throw new InvalidArgumentException(
124
-                      sprintf(
124
+                        sprintf(
125 125
                         'Position "%s" is already in use by "%s", try setting a different position for "%s".',
126 126
                         $annotation->position,
127 127
                         $propertiesAndMethodsWithPosition[$annotation->position]['name'],
128 128
                         $name
129
-                      )
129
+                        )
130 130
                     );
131 131
                 }
132 132
 
133 133
                 $propertiesAndMethodsWithPosition[$annotation->position] = [
134
-                  'name' => $name,
135
-                  'annotation' => $annotation,
134
+                    'name' => $name,
135
+                    'annotation' => $annotation,
136 136
                 ];
137 137
             }
138 138
         }
@@ -144,15 +144,15 @@  discard block
 block discarded – undo
144 144
         ksort($propertiesAndMethodsWithPosition);
145 145
 
146 146
         $propertiesAndMethods = array_merge(
147
-          $propertiesAndMethodsWithPosition,
148
-          $propertiesAndMethodsWithoutPosition
147
+            $propertiesAndMethodsWithPosition,
148
+            $propertiesAndMethodsWithoutPosition
149 149
         );
150 150
 
151 151
         foreach ($propertiesAndMethods as $propertyAndMethod) {
152 152
             $this->addField(
153
-              $propertyAndMethod['name'],
154
-              $propertyAndMethod['annotation'],
155
-              $listMapper
153
+                $propertyAndMethod['name'],
154
+                $propertyAndMethod['annotation'],
155
+                $listMapper
156 156
             );
157 157
         }
158 158
 
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
 
163 163
         if ($actions = $this->getListActions($class)) {
164 164
             $listMapper->add('_action', null, [
165
-              'actions' => $actions,
165
+                'actions' => $actions,
166 166
             ]);
167 167
         }
168 168
     }
@@ -177,9 +177,9 @@  discard block
 block discarded – undo
177 177
      * @return void
178 178
      */
179 179
     private function addField(
180
-      string $name,
181
-      ListField $annotation,
182
-      ListMapper $listMapper
180
+        string $name,
181
+        ListField $annotation,
182
+        ListMapper $listMapper
183 183
     ): void {
184 184
         $listMapper->add($name, ...$annotation->getSettings());
185 185
     }
@@ -201,9 +201,9 @@  discard block
 block discarded – undo
201 201
             if ($annotation instanceof ListAction) {
202 202
                 if (!isset($annotation->name)) {
203 203
                     throw new MissingAnnotationArgumentException(
204
-                      $annotation,
205
-                      'name',
206
-                      $class
204
+                        $annotation,
205
+                        'name',
206
+                        $class
207 207
                     );
208 208
                 }
209 209
 
Please login to merge, or discard this patch.
src/Reader/RouteReader.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -38,9 +38,9 @@
 block discarded – undo
38 38
                 || $annotation instanceof RemoveRoute)
39 39
               && !isset($annotation->name)) {
40 40
                 throw new MissingAnnotationArgumentException(
41
-                  $annotation,
42
-                  'name',
43
-                  $class
41
+                    $annotation,
42
+                    'name',
43
+                    $class
44 44
                 );
45 45
             }
46 46
 
Please login to merge, or discard this patch.
src/Reader/AddChildReader.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -37,17 +37,17 @@
 block discarded – undo
37 37
 
38 38
             if (!isset($annotation->class)) {
39 39
                 throw new MissingAnnotationArgumentException(
40
-                  $annotation,
41
-                  'class',
42
-                  $class
40
+                    $annotation,
41
+                    'class',
42
+                    $class
43 43
                 );
44 44
             }
45 45
 
46 46
             if (!isset($annotation->field)) {
47 47
                 throw new MissingAnnotationArgumentException(
48
-                  $annotation,
49
-                  'field',
50
-                  $class
48
+                    $annotation,
49
+                    'field',
50
+                    $class
51 51
                 );
52 52
             }
53 53
 
Please login to merge, or discard this patch.