@@ -221,7 +221,7 @@ |
||
221 | 221 | } |
222 | 222 | |
223 | 223 | /** |
224 | - * @param array $groups |
|
224 | + * @param string[] $groups |
|
225 | 225 | * @param string $annotationSource |
226 | 226 | */ |
227 | 227 | private function sanitizeGroupNames($groups, $annotationSource) |
@@ -191,8 +191,8 @@ discard block |
||
191 | 191 | } elseif ($annot instanceof Accessor) { |
192 | 192 | $accessor = array($annot->getter, $annot->setter); |
193 | 193 | } elseif ($annot instanceof Exclude) { |
194 | - if (!empty($annot->groups)) { |
|
195 | - $annotationSource = $propertyMetadata->class . '->' . $propertyMetadata->name; |
|
194 | + if ( ! empty($annot->groups)) { |
|
195 | + $annotationSource = $propertyMetadata->class.'->'.$propertyMetadata->name; |
|
196 | 196 | $this->sanitizeGroupNames($annot->groups, $annotationSource); |
197 | 197 | $propertyMetadata->exclusionGroups = $annot->groups; |
198 | 198 | } else { |
@@ -201,7 +201,7 @@ discard block |
||
201 | 201 | |
202 | 202 | } elseif ($annot instanceof Groups) { |
203 | 203 | $propertyMetadata->groups = $annot->groups; |
204 | - $annotationSource = $propertyMetadata->class . '->' . $propertyMetadata->name; |
|
204 | + $annotationSource = $propertyMetadata->class.'->'.$propertyMetadata->name; |
|
205 | 205 | $this->sanitizeGroupNames($propertyMetadata->groups, $annotationSource); |
206 | 206 | } elseif ($annot instanceof Inline) { |
207 | 207 | $propertyMetadata->inline = true; |
@@ -229,7 +229,7 @@ discard block |
||
229 | 229 | */ |
230 | 230 | private function sanitizeGroupNames($groups, $annotationSource) |
231 | 231 | { |
232 | - foreach ((array)$groups as $groupName) { |
|
232 | + foreach ((array) $groups as $groupName) { |
|
233 | 233 | if (false !== strpos($groupName, ',')) { |
234 | 234 | throw new InvalidArgumentException(sprintf( |
235 | 235 | 'Invalid group name "%s" on "%s", did you mean to create multiple groups?', |
@@ -54,7 +54,7 @@ |
||
54 | 54 | if (is_array($metadataGroups) && empty($metadataGroups)) { |
55 | 55 | return true; |
56 | 56 | } |
57 | - if (!empty($this->groups) && array_intersect(array_keys($this->groups), $metadataGroups)) { |
|
57 | + if ( ! empty($this->groups) && array_intersect(array_keys($this->groups), $metadataGroups)) { |
|
58 | 58 | return true; |
59 | 59 | } |
60 | 60 |
@@ -47,7 +47,8 @@ |
||
47 | 47 | * @param $metadataGroups |
48 | 48 | * @return bool |
49 | 49 | */ |
50 | - private function shouldSkipGroup($metadataGroups) { |
|
50 | + private function shouldSkipGroup($metadataGroups) |
|
51 | + { |
|
51 | 52 | if (false === $metadataGroups) { |
52 | 53 | return false; |
53 | 54 | } |
@@ -168,13 +168,13 @@ |
||
168 | 168 | $parentStr |
169 | 169 | ) = $unserialized; |
170 | 170 | |
171 | - if (isset($unserialized['xmlEntryNamespace'])){ |
|
171 | + if (isset($unserialized['xmlEntryNamespace'])) { |
|
172 | 172 | $this->xmlEntryNamespace = $unserialized['xmlEntryNamespace']; |
173 | 173 | } |
174 | - if (isset($unserialized['xmlCollectionSkipWhenEmpty'])){ |
|
174 | + if (isset($unserialized['xmlCollectionSkipWhenEmpty'])) { |
|
175 | 175 | $this->xmlCollectionSkipWhenEmpty = $unserialized['xmlCollectionSkipWhenEmpty']; |
176 | 176 | } |
177 | - if (isset($unserialized['exclusionGroups'])){ |
|
177 | + if (isset($unserialized['exclusionGroups'])) { |
|
178 | 178 | $this->exclusionGroups = $unserialized['exclusionGroups']; |
179 | 179 | } |
180 | 180 |
@@ -168,13 +168,13 @@ |
||
168 | 168 | $parentStr |
169 | 169 | ) = $unserialized; |
170 | 170 | |
171 | - if (isset($unserialized['xmlEntryNamespace'])){ |
|
171 | + if (isset($unserialized['xmlEntryNamespace'])) { |
|
172 | 172 | $this->xmlEntryNamespace = $unserialized['xmlEntryNamespace']; |
173 | 173 | } |
174 | - if (isset($unserialized['xmlCollectionSkipWhenEmpty'])){ |
|
174 | + if (isset($unserialized['xmlCollectionSkipWhenEmpty'])) { |
|
175 | 175 | $this->xmlCollectionSkipWhenEmpty = $unserialized['xmlCollectionSkipWhenEmpty']; |
176 | 176 | } |
177 | - if (isset($unserialized['exclusionGroups'])){ |
|
177 | + if (isset($unserialized['exclusionGroups'])) { |
|
178 | 178 | $this->exclusionGroups = $unserialized['exclusionGroups']; |
179 | 179 | } |
180 | 180 |