Completed
Pull Request — master (#539)
by Delf
02:45
created
src/JMS/Serializer/EventDispatcher/EventDispatcher.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -80,7 +80,7 @@
 block discarded – undo
80 80
             $this->classListeners[$eventName][$loweredClass][$format] = $this->initializeListeners($eventName, $loweredClass, $format);
81 81
         }
82 82
 
83
-        return !!$this->classListeners[$eventName][$loweredClass][$format];
83
+        return ! ! $this->classListeners[$eventName][$loweredClass][$format];
84 84
     }
85 85
 
86 86
     public function dispatch($eventName, $class, $format, Event $event)
Please login to merge, or discard this patch.
src/JMS/Serializer/Util/Writer.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -83,16 +83,16 @@
 block discarded – undo
83 83
         $addition = '';
84 84
 
85 85
         $lines = explode("\n", $content);
86
-        for ($i=0,$c=count($lines); $i<$c; $i++) {
86
+        for ($i = 0, $c = count($lines); $i < $c; $i++) {
87 87
             if ($this->indentationLevel > 0
88
-                && !empty($lines[$i])
88
+                && ! empty($lines[$i])
89 89
                 && ((empty($addition) && "\n" === substr($this->content, -1)) || "\n" === substr($addition, -1))) {
90 90
                 $addition .= str_repeat(' ', $this->indentationLevel * $this->indentationSpaces);
91 91
             }
92 92
 
93 93
             $addition .= $lines[$i];
94 94
 
95
-            if ($i+1 < $c) {
95
+            if ($i + 1 < $c) {
96 96
                 $addition .= "\n";
97 97
             }
98 98
         }
Please login to merge, or discard this patch.
src/JMS/Serializer/Metadata/Driver/AnnotationDriver.php 1 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 1 patch
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.