Passed
Pull Request — master (#275)
by
unknown
09:01
created
bin/generateModels.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-require_once(__DIR__ . "/../vendor/autoload.php");
3
+require_once(__DIR__."/../vendor/autoload.php");
4 4
 
5 5
 use Symfony\Component\Console\Application;
6 6
 use garethp\ews\Generator\ConvertToPHP;
Please login to merge, or discard this patch.
src/BuildableTrait.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
         }
45 45
 
46 46
         if ($array instanceof XmlObject && $strict) {
47
-            $array = (array)$array;
47
+            $array = (array) $array;
48 48
         }
49 49
 
50 50
         if (!is_array($array)) {
@@ -66,8 +66,8 @@  discard block
 block discarded – undo
66 66
         foreach ($array as $key => $value) {
67 67
             // If we're in strict mode, let's take the reflection class, check for a setter and try to use that to build
68 68
             // the array, resulting in type-correct responses the whole way down.
69
-            if ($strict === true && $reflect->hasMethod("set" . ucfirst($key))) {
70
-                $parameters = $reflect->getMethod("set" . ucfirst($key))->getParameters();
69
+            if ($strict === true && $reflect->hasMethod("set".ucfirst($key))) {
70
+                $parameters = $reflect->getMethod("set".ucfirst($key))->getParameters();
71 71
 
72 72
                 if (count($parameters) === 1
73 73
                     && $parameters[0]->hasType()
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
     public function toXmlObject()
108 108
     {
109 109
         $objectToReturn = new XmlObject();
110
-        $objectToReturn->_ = (string)$this;
110
+        $objectToReturn->_ = (string) $this;
111 111
 
112 112
         $properties = $this->getNonNullItems(true);
113 113
 
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
         }
145 145
 
146 146
         if (is_array($property)) {
147
-            return array_map(function ($property) {
147
+            return array_map(function($property) {
148 148
                 if ($property instanceof Type) {
149 149
                     return $property->toXmlObject();
150 150
                 }
@@ -158,7 +158,7 @@  discard block
 block discarded – undo
158 158
 
159 159
     public static function arrayIsAssoc($array)
160 160
     {
161
-        return (bool)count(array_filter(array_keys($array), 'is_string'));
161
+        return (bool) count(array_filter(array_keys($array), 'is_string'));
162 162
     }
163 163
 
164 164
     /**
Please login to merge, or discard this patch.
src/API/TypeConverter.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
      */
65 65
     private static function getSetterType($object, string $property): ?string
66 66
     {
67
-        $method = 'set' . ucfirst($property);
67
+        $method = 'set'.ucfirst($property);
68 68
         if (!method_exists($object, $method)) {
69 69
             return null;
70 70
         }
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
      */
95 95
     private static function setProperty(object $instance, string $property, $value): void
96 96
     {
97
-        $setter = 'set' . ucfirst($property);
97
+        $setter = 'set'.ucfirst($property);
98 98
         if (!method_exists($instance, $setter)) {
99 99
             if (property_exists($instance, $property)) {
100 100
                 $instance->$property = $value;
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
                 }
122 122
                 if ($name === 'array') {
123 123
                     $props = get_object_vars($value);
124
-                    $arr = count($props) === 1 ? current($props) : (array)$value;
124
+                    $arr = count($props) === 1 ? current($props) : (array) $value;
125 125
                     return is_array($arr) ? $arr : [$arr];
126 126
                 }
127 127
             }
Please login to merge, or discard this patch.
src/API/MagicMethodsTrait.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -18,9 +18,9 @@
 block discarded – undo
18 18
             $value = $value->Entry;
19 19
         }
20 20
 
21
-        if ($this->methodExists("set" . ucfirst($name))) {
21
+        if ($this->methodExists("set".ucfirst($name))) {
22 22
             $convertedValue = TypeConverter::convertValueToExpectedType($this, $value, $name);
23
-            $this->{"set" . ucfirst($name)}($convertedValue);
23
+            $this->{"set".ucfirst($name)}($convertedValue);
24 24
             return;
25 25
         }
26 26
 
Please login to merge, or discard this patch.