Completed
Push — master ( 5fca22...233410 )
by Emily
01:43
created
src/Model/Collection/Map/OrderedMap.php 2 patches
Spacing   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -44,8 +44,7 @@
 block discarded – undo
44 44
     {
45 45
         if (!$pair instanceof OrderedPair)
46 46
         {
47
-            $pair = new OrderedPair
48
-            (
47
+            $pair = new OrderedPair(
49 48
                 $this->size(),
50 49
                 $pair->key,
51 50
                 $pair->value
Please login to merge, or discard this patch.
Doc Comments   -2 removed lines patch added patch discarded remove patch
@@ -37,8 +37,6 @@
 block discarded – undo
37 37
     /**
38 38
      * Adds an element to the Map
39 39
      *
40
-     * @param KeyType $key The key to add
41
-     * @param ValueType $value The value to add
42 40
      */
43 41
     public function insert(Pair $pair)
44 42
     {
Please login to merge, or discard this patch.
src/Factory/Reflection/ReflectionMethodFactory.php 2 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
         $this->initParams();
98 98
 
99 99
         $this->accessor->setRawValue('visibility',
100
-              ($this->reflector->isPublic() ? 'public'
100
+                ($this->reflector->isPublic() ? 'public'
101 101
             : ($this->reflector->isProtected() ? 'protected'
102 102
             : ($this->reflector->isPrivate() ? 'private'
103 103
             : (''))))
@@ -154,7 +154,7 @@  discard block
 block discarded – undo
154 154
         {
155 155
             throw new \Exception
156 156
             (
157
-                  'Tried to set param annotation for non existant '
157
+                    'Tried to set param annotation for non existant '
158 158
                 . 'parameter: ' . $param
159 159
             );
160 160
         }
@@ -168,7 +168,7 @@  discard block
 block discarded – undo
168 168
         {
169 169
             throw new \Exception
170 170
             (
171
-                  'Types are incompatible for: '
171
+                    'Types are incompatible for: '
172 172
                 . $this->reflector->getName() . '::' . $items[1]
173 173
             );
174 174
         }
Please login to merge, or discard this patch.
Spacing   +8 added lines, -16 removed lines patch added patch discarded remove patch
@@ -64,8 +64,7 @@  discard block
 block discarded – undo
64 64
      */
65 65
     public static function fromName(string $class, string $method)
66 66
     {
67
-        return new static(new PHPNativeReflectionMethod
68
-        (
67
+        return new static(new PHPNativeReflectionMethod(
69 68
             $class, $method
70 69
         ));
71 70
     }
@@ -89,8 +88,7 @@  discard block
 block discarded – undo
89 88
     {
90 89
         $this->typeParser = new TypeParser($parent);
91 90
         $this->accessor->setRawValue('owner', $parent);
92
-        $this->accessor->setRawValue
93
-        (
91
+        $this->accessor->setRawValue(
94 92
             'name',
95 93
             $this->reflector->getName()
96 94
         );
@@ -118,8 +116,7 @@  discard block
 block discarded – undo
118 116
         $type = $this->reflector->getReturnType();
119 117
         if ($type)
120 118
         {
121
-            $this->accessor->setRawValue
122
-            (
119
+            $this->accessor->setRawValue(
123 120
                 'nativeReturnType',
124 121
                 !$type->isBuiltin() ? '\\' . $type : (string)$type
125 122
             );
@@ -136,13 +133,11 @@  discard block
 block discarded – undo
136 133
      */
137 134
     protected function initParams()
138 135
     {
139
-        $this->accessor->setRawValue
140
-        (
136
+        $this->accessor->setRawValue(
141 137
             'parameters',
142 138
             new FixedList(count($this->reflector->getParameters()))
143 139
         );
144
-        $this->accessor->setRawValue
145
-        (
140
+        $this->accessor->setRawValue(
146 141
             'nativeParameters',
147 142
             new FixedList(count($this->reflector->getParameters()))
148 143
         );
@@ -163,8 +158,7 @@  discard block
 block discarded – undo
163 158
 
164 159
         if (!$this->parameters->containsKey($param))
165 160
         {
166
-            throw new \Exception
167
-            (
161
+            throw new \Exception(
168 162
                   'Tried to set param annotation for non existant '
169 163
                 . 'parameter: ' . $param
170 164
             );
@@ -177,8 +171,7 @@  discard block
 block discarded – undo
177 171
 
178 172
         if (!$comparator->compatible($nativeType, $type))
179 173
         {
180
-            throw new \Exception
181
-            (
174
+            throw new \Exception(
182 175
                   'Types are incompatible for: '
183 176
                 . $this->reflector->getName() . '::' . $items[1]
184 177
             );
@@ -193,8 +186,7 @@  discard block
 block discarded – undo
193 186
      *
194 187
      * @param PHPNativeReflectionParameter $reflect
195 188
      */
196
-    protected function addParameter
197
-    (
189
+    protected function addParameter(
198 190
         PHPNativeReflectionParameter $reflect
199 191
     )
200 192
     : void
Please login to merge, or discard this patch.
src/Model/Collection/Map/HashMap.php 1 patch
Spacing   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -41,8 +41,7 @@  discard block
 block discarded – undo
41 41
         return static::$defaultHashProducer;
42 42
     }
43 43
 
44
-    public static function setDefaultHashProducer
45
-    (
44
+    public static function setDefaultHashProducer(
46 45
         HashProducerInterface $hashProducer
47 46
     )
48 47
     : HashProducerInterface
@@ -60,8 +59,7 @@  discard block
 block discarded – undo
60 59
      */
61 60
     protected $hashProducer;
62 61
 
63
-    public function __construct
64
-    (
62
+    public function __construct(
65 63
         ?HashProducerInterface $hashProducer = null
66 64
     )
67 65
     {
Please login to merge, or discard this patch.
src/Model/Collection/ListCollection/FlexibleList.php 1 patch
Spacing   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -45,8 +45,7 @@
 block discarded – undo
45 45
     /**
46 46
      * {@inheritDoc}
47 47
      */
48
-    public function splice
49
-    (
48
+    public function splice(
50 49
         int $offset,
51 50
         ?int $length = null,
52 51
         array $replacement = []
Please login to merge, or discard this patch.
src/Model/Collection/ListCollection/ArrayList.php 1 patch
Spacing   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -43,8 +43,7 @@
 block discarded – undo
43 43
      * @param int $length The number of elements to remove
44 44
      * @param array $items Items to add
45 45
      */
46
-    public function splice
47
-    (
46
+    public function splice(
48 47
         int $offset,
49 48
         ?int$length = null,
50 49
         array $items = []
Please login to merge, or discard this patch.
src/Factory/Reflection/TypeParser.php 3 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -169,6 +169,9 @@
 block discarded – undo
169 169
         return new ObjectType($context);
170 170
     }
171 171
 
172
+    /**
173
+     * @param string $var
174
+     */
172 175
     public function scalarToType($var) : ?AbstractType
173 176
     {
174 177
         switch (strtolower($var))
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -146,7 +146,7 @@
 block discarded – undo
146 146
         }
147 147
         elseif ($i + 2 !== strlen($value))
148 148
         {
149
-            if (!in_array($value{$i + 2}, ['>',',']))
149
+            if (!in_array($value{$i + 2}, ['>', ',']))
150 150
             {
151 151
                 throw new \Exception('Unexpected char after collection');
152 152
             }
Please login to merge, or discard this patch.
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -139,12 +139,10 @@  discard block
 block discarded – undo
139 139
         if ($i + 1 === strlen($value))
140 140
         {
141 141
             throw new \Exception('Unexpected EOF');
142
-        }
143
-        elseif ($value{$i + 1} !== ']')
142
+        } elseif ($value{$i + 1} !== ']')
144 143
         {
145 144
             throw new \Exception('[ must be followed by ]');
146
-        }
147
-        elseif ($i + 2 !== strlen($value))
145
+        } elseif ($i + 2 !== strlen($value))
148 146
         {
149 147
             if (!in_array($value{$i + 2}, ['>',',']))
150 148
             {
@@ -240,8 +238,7 @@  discard block
 block discarded – undo
240 238
         if ($useStatements->containsKey($this->currentValue))
241 239
         {
242 240
             return $useStatements[$this->currentValue]->classname;
243
-        }
244
-        else
241
+        } else
245 242
         {
246 243
             return $this->context->namespace->namespace
247 244
                 . '\\' . $this->currentValue;
Please login to merge, or discard this patch.
src/Model/Collection/IterableIterator.php 2 patches
Spacing   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -73,8 +73,7 @@
 block discarded – undo
73 73
                 }
74 74
                 else
75 75
                 {
76
-                    throw new DomainException
77
-                    (
76
+                    throw new DomainException(
78 77
                         'The given IteratorAggregate\'s ' .
79 78
                         'getIterator() method should return an ' .
80 79
                         'Iterator or IteratorAggregate, but it did not'
Please login to merge, or discard this patch.
Braces   +5 added lines, -10 removed lines patch added patch discarded remove patch
@@ -51,12 +51,10 @@  discard block
 block discarded – undo
51 51
         if (is_array($iterator))
52 52
         {
53 53
             $this->iterator = new ArrayIterator($iterator);
54
-        }
55
-        elseif ($iterator instanceof Iterator)
54
+        } elseif ($iterator instanceof Iterator)
56 55
         {
57 56
             $this->iterator = $iterator;
58
-        }
59
-        elseif ($iterator instanceof IteratorAggregate)
57
+        } elseif ($iterator instanceof IteratorAggregate)
60 58
         {
61 59
             while (true)
62 60
             {
@@ -66,12 +64,10 @@  discard block
 block discarded – undo
66 64
                 {
67 65
                     $this->iterator = $newIterator;
68 66
                     break;
69
-                }
70
-                elseif ($newIterator instanceof IteratorAggregate)
67
+                } elseif ($newIterator instanceof IteratorAggregate)
71 68
                 {
72 69
                     $iterator = $newIterator;
73
-                }
74
-                else
70
+                } else
75 71
                 {
76 72
                     throw new DomainException
77 73
                     (
@@ -81,8 +77,7 @@  discard block
 block discarded – undo
81 77
                     );
82 78
                 }
83 79
             }
84
-        }
85
-        else
80
+        } else
86 81
         {
87 82
             throw new DomainException('Unknown type of iterator');
88 83
         }
Please login to merge, or discard this patch.
src/Model/Collection/ListCollection/FixedList.php 1 patch
Spacing   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -45,8 +45,7 @@
 block discarded – undo
45 45
     /**
46 46
      * {@inheritDoc}
47 47
      */
48
-    public function splice
49
-    (
48
+    public function splice(
50 49
         int $offset,
51 50
         ?int $length = null,
52 51
         array $replacement = []
Please login to merge, or discard this patch.