Completed
Pull Request — master (#754)
by Dmitriy
15:21
created
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 2 patches
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.
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,6 @@
 block discarded – undo
19 19
 namespace JMS\Serializer\Metadata\Driver;
20 20
 
21 21
 use JMS\Serializer\Annotation\Discriminator;
22
-use JMS\Serializer\Annotation\ExcludeIf;
23 22
 use JMS\Serializer\Annotation\XmlDiscriminator;
24 23
 use JMS\Serializer\GraphNavigator;
25 24
 use JMS\Serializer\Annotation\HandlerCallback;
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.
src/JMS/Serializer/EventDispatcher/Subscriber/DoctrineProxySubscriber.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@
 block discarded – undo
60 60
         }
61 61
 
62 62
         if (($this->skipVirtualTypeInit && $virtualType) ||
63
-            (!$object instanceof Proxy && !$object instanceof ORMProxy)
63
+            ( ! $object instanceof Proxy && ! $object instanceof ORMProxy)
64 64
         ) {
65 65
             return;
66 66
         }
Please login to merge, or discard this patch.
src/JMS/Serializer/GraphNavigator.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -205,7 +205,7 @@
 block discarded – undo
205 205
                 /** @var $metadata ClassMetadata */
206 206
                 $metadata = $this->metadataFactory->getMetadataForClass($type['name']);
207 207
 
208
-                if ($metadata->usingExpression && !$this->expressionExclusionStrategy) {
208
+                if ($metadata->usingExpression && ! $this->expressionExclusionStrategy) {
209 209
                     throw new ExpressionLanguageRequiredException("To use conditional exclude/expose in {$metadata->name} you must configure the expression language.");
210 210
                 }
211 211
 
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -82,8 +82,7 @@
 block discarded – undo
82 82
         ObjectConstructorInterface $objectConstructor,
83 83
         EventDispatcherInterface $dispatcher = null,
84 84
         ExpressionEvaluatorInterface $expressionEvaluator = null
85
-    )
86
-    {
85
+    ) {
87 86
         $this->dispatcher = $dispatcher;
88 87
         $this->metadataFactory = $metadataFactory;
89 88
         $this->handlerRegistry = $handlerRegistry;
Please login to merge, or discard this patch.
src/JMS/Serializer/Expression/ExpressionEvaluator.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -64,13 +64,13 @@
 block discarded – undo
64 64
      */
65 65
     public function evaluate($expression, array $data = array())
66 66
     {
67
-        if (!is_string($expression)) {
67
+        if ( ! is_string($expression)) {
68 68
             return $expression;
69 69
         }
70 70
 
71 71
         $context = $data + $this->context;
72 72
 
73
-        if (!array_key_exists($expression, $this->cache)) {
73
+        if ( ! array_key_exists($expression, $this->cache)) {
74 74
             $this->cache[$expression] = $this->expressionLanguage->parse($expression, array_keys($context));
75 75
         }
76 76
 
Please login to merge, or discard this patch.
src/JMS/Serializer/Metadata/ExpressionPropertyMetadata.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -115,10 +115,10 @@
 block discarded – undo
115 115
             $this->name
116 116
         ) = $unserialized;
117 117
 
118
-        if (isset($unserialized['excludeIf'])){
118
+        if (isset($unserialized['excludeIf'])) {
119 119
             $this->excludeIf = $unserialized['excludeIf'];
120 120
         }
121
-        if (isset($unserialized['expression'])){
121
+        if (isset($unserialized['expression'])) {
122 122
             $this->expression = $unserialized['expression'];
123 123
         }
124 124
     }
Please login to merge, or discard this patch.
Braces   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -115,10 +115,10 @@
 block discarded – undo
115 115
             $this->name
116 116
         ) = $unserialized;
117 117
 
118
-        if (isset($unserialized['excludeIf'])){
118
+        if (isset($unserialized['excludeIf'])) {
119 119
             $this->excludeIf = $unserialized['excludeIf'];
120 120
         }
121
-        if (isset($unserialized['expression'])){
121
+        if (isset($unserialized['expression'])) {
122 122
             $this->expression = $unserialized['expression'];
123 123
         }
124 124
     }
Please login to merge, or discard this patch.
src/JMS/Serializer/Metadata/Driver/XmlDriver.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
         foreach ($elem->xpath('./virtual-property') as $method) {
118 118
 
119 119
             if (isset($method->attributes()->expression)) {
120
-                $virtualPropertyMetadata = new ExpressionPropertyMetadata($name, (string)$method->attributes()->name, (string)$method->attributes()->expression);
120
+                $virtualPropertyMetadata = new ExpressionPropertyMetadata($name, (string) $method->attributes()->name, (string) $method->attributes()->expression);
121 121
             } else {
122 122
                 if ( ! isset($method->attributes()->method)) {
123 123
                     throw new RuntimeException('The method attribute must be set for all virtual-property elements.');
@@ -159,11 +159,11 @@  discard block
 block discarded – undo
159 159
                     }
160 160
 
161 161
                     if (null !== $excludeIf = $pElem->attributes()->{'exclude-if'}) {
162
-                        $pMetadata->excludeIf =$excludeIf;
162
+                        $pMetadata->excludeIf = $excludeIf;
163 163
                     }
164 164
 
165 165
                     if (null !== $excludeIf = $pElem->attributes()->{'expose-if'}) {
166
-                        $pMetadata->excludeIf = "!(" . $excludeIf .")";
166
+                        $pMetadata->excludeIf = "!(".$excludeIf.")";
167 167
                         $isExpose = true;
168 168
                     }
169 169
 
Please login to merge, or discard this patch.