Completed
Pull Request — master (#754)
by Dmitriy
15:21
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/EventDispatcher/Events.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,5 +25,7 @@
 block discarded – undo
25 25
     const PRE_DESERIALIZE = 'serializer.pre_deserialize';
26 26
     const POST_DESERIALIZE = 'serializer.post_deserialize';
27 27
 
28
-    final private function __construct() { }
28
+    final private function __construct()
29
+    {
30
+}
29 31
 }
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/Handler/DateHandler.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -72,8 +72,7 @@  discard block
 block discarded – undo
72 72
         \DateTimeInterface $date,
73 73
         array $type,
74 74
         Context $context
75
-    )
76
-    {
75
+    ) {
77 76
         if ($visitor instanceof XmlSerializationVisitor && false === $this->xmlCData) {
78 77
             return $visitor->visitSimpleString($date->format($this->getFormat($type)), $type, $context);
79 78
         }
@@ -96,8 +95,7 @@  discard block
 block discarded – undo
96 95
         \DateTimeImmutable $date,
97 96
         array $type,
98 97
         Context $context
99
-    )
100
-    {
98
+    ) {
101 99
         return $this->serializeDateTimeInterface($visitor, $date, $type, $context);
102 100
     }
103 101
 
Please login to merge, or discard this patch.
src/JMS/Serializer/Context.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -256,7 +256,7 @@
 block discarded – undo
256 256
      */
257 257
     public function getCurrentPath()
258 258
     {
259
-        if (!$this->metadataStack) {
259
+        if ( ! $this->metadataStack) {
260 260
             return array();
261 261
         }
262 262
 
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
@@ -169,13 +169,13 @@
 block discarded – undo
169 169
             $parentStr
170 170
         ) = $unserialized;
171 171
 
172
-        if (isset($unserialized['xmlEntryNamespace'])){
172
+        if (isset($unserialized['xmlEntryNamespace'])) {
173 173
             $this->xmlEntryNamespace = $unserialized['xmlEntryNamespace'];
174 174
         }
175
-        if (isset($unserialized['xmlCollectionSkipWhenEmpty'])){
175
+        if (isset($unserialized['xmlCollectionSkipWhenEmpty'])) {
176 176
             $this->xmlCollectionSkipWhenEmpty = $unserialized['xmlCollectionSkipWhenEmpty'];
177 177
         }
178
-        if (isset($unserialized['excludeIf'])){
178
+        if (isset($unserialized['excludeIf'])) {
179 179
             $this->excludeIf = $unserialized['excludeIf'];
180 180
         }
181 181
 
Please login to merge, or discard this patch.
Braces   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -169,13 +169,13 @@
 block discarded – undo
169 169
             $parentStr
170 170
         ) = $unserialized;
171 171
 
172
-        if (isset($unserialized['xmlEntryNamespace'])){
172
+        if (isset($unserialized['xmlEntryNamespace'])) {
173 173
             $this->xmlEntryNamespace = $unserialized['xmlEntryNamespace'];
174 174
         }
175
-        if (isset($unserialized['xmlCollectionSkipWhenEmpty'])){
175
+        if (isset($unserialized['xmlCollectionSkipWhenEmpty'])) {
176 176
             $this->xmlCollectionSkipWhenEmpty = $unserialized['xmlCollectionSkipWhenEmpty'];
177 177
         }
178
-        if (isset($unserialized['excludeIf'])){
178
+        if (isset($unserialized['excludeIf'])) {
179 179
             $this->excludeIf = $unserialized['excludeIf'];
180 180
         }
181 181
 
Please login to merge, or discard this patch.
src/JMS/Serializer/Metadata/VirtualPropertyMetadata.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -100,7 +100,7 @@
 block discarded – undo
100 100
             $this->name
101 101
         ) = $unserialized;
102 102
 
103
-        if (isset($unserialized['excludeIf'])){
103
+        if (isset($unserialized['excludeIf'])) {
104 104
             $this->excludeIf = $unserialized['excludeIf'];
105 105
         }
106 106
     }
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -100,7 +100,7 @@
 block discarded – undo
100 100
             $this->name
101 101
         ) = $unserialized;
102 102
 
103
-        if (isset($unserialized['excludeIf'])){
103
+        if (isset($unserialized['excludeIf'])) {
104 104
             $this->excludeIf = $unserialized['excludeIf'];
105 105
         }
106 106
     }
Please login to merge, or discard this patch.
src/JMS/Serializer/Metadata/Driver/AnnotationDriver.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -159,7 +159,7 @@
 block discarded – undo
159 159
                     } elseif ($annot instanceof Expose) {
160 160
                         $isExpose = true;
161 161
                         if (null !== $annot->if) {
162
-                            $propertyMetadata->excludeIf = "!(" . $annot->if . ")";
162
+                            $propertyMetadata->excludeIf = "!(".$annot->if.")";
163 163
                         }
164 164
                     } elseif ($annot instanceof Exclude) {
165 165
                         if (null !== $annot->if) {
Please login to merge, or discard this patch.
EventDispatcher/Subscriber/SymfonyValidatorValidatorSubscriber.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@
 block discarded – undo
56 56
             ? null
57 57
             : $context->attributes->get('validation_groups')->get();
58 58
 
59
-        if (!$groups) {
59
+        if ( ! $groups) {
60 60
             return;
61 61
         }
62 62
 
Please login to merge, or discard this patch.