Completed
Pull Request — master (#539)
by Delf
03:23
created
src/JMS/Serializer/Metadata/Driver/AnnotationDriver.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -221,7 +221,7 @@
 block discarded – undo
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)
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -191,8 +191,8 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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?',
Please login to merge, or discard this patch.
src/JMS/Serializer/Exclusion/ExclusionGroupsExclusionStrategy.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -47,7 +47,8 @@
 block discarded – undo
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
         }
Please login to merge, or discard this patch.
src/JMS/Serializer/Metadata/PropertyMetadata.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -168,13 +168,13 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
Braces   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -168,13 +168,13 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.