Completed
Pull Request — master (#539)
by Delf
02:45
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
@@ -189,8 +189,8 @@  discard block
 block discarded – undo
189 189
                 } elseif ($annot instanceof Accessor) {
190 190
                     $accessor = array($annot->getter, $annot->setter);
191 191
                 } elseif ($annot instanceof Exclude) {
192
-                    if (!empty($annot->groups)) {
193
-                        $annotationSource = $propertyMetadata->class . '->' . $propertyMetadata->name;
192
+                    if ( ! empty($annot->groups)) {
193
+                        $annotationSource = $propertyMetadata->class.'->'.$propertyMetadata->name;
194 194
                         $this->sanitizeGroupNames($annot->groups, $annotationSource);
195 195
                         $propertyMetadata->exclusionGroups = $annot->groups;
196 196
                     } else {
@@ -199,7 +199,7 @@  discard block
 block discarded – undo
199 199
 
200 200
                 } elseif ($annot instanceof Groups) {
201 201
                     $propertyMetadata->groups = $annot->groups;
202
-                    $annotationSource = $propertyMetadata->class . '->' . $propertyMetadata->name;
202
+                    $annotationSource = $propertyMetadata->class.'->'.$propertyMetadata->name;
203 203
                     $this->sanitizeGroupNames($propertyMetadata->groups, $annotationSource);
204 204
                 } elseif ($annot instanceof Inline) {
205 205
                     $propertyMetadata->inline = true;
@@ -226,7 +226,7 @@  discard block
 block discarded – undo
226 226
      */
227 227
     private function sanitizeGroupNames($groups, $annotationSource)
228 228
     {
229
-        foreach ((array)$groups as $groupName) {
229
+        foreach ((array) $groups as $groupName) {
230 230
             if (false !== strpos($groupName, ',')) {
231 231
                 throw new InvalidArgumentException(sprintf(
232 232
                     '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.