@@ -110,8 +110,7 @@ |
||
110 | 110 | $prop->setAccessible(true); |
111 | 111 | |
112 | 112 | return $prop; |
113 | - } |
|
114 | - catch (ReflectionException $e) |
|
113 | + } catch (ReflectionException $e) |
|
115 | 114 | { |
116 | 115 | throw new $class |
117 | 116 | ( |
@@ -93,8 +93,7 @@ discard block |
||
93 | 93 | { |
94 | 94 | $as .= $token[1]; |
95 | 95 | } |
96 | - } |
|
97 | - elseif ($matching) |
|
96 | + } elseif ($matching) |
|
98 | 97 | { |
99 | 98 | switch ($token[0]) |
100 | 99 | { |
@@ -105,8 +104,7 @@ discard block |
||
105 | 104 | case T_AS: |
106 | 105 | $matching = T_AS; |
107 | 106 | } |
108 | - } |
|
109 | - else |
|
107 | + } else |
|
110 | 108 | { |
111 | 109 | switch ($token[0]) |
112 | 110 | { |
@@ -12,8 +12,7 @@ discard block |
||
12 | 12 | if ($property->writable) |
13 | 13 | { |
14 | 14 | parent::setAnyValue($property, $value); |
15 | - } |
|
16 | - else |
|
15 | + } else |
|
17 | 16 | { |
18 | 17 | throw new PropertyNotWritableException |
19 | 18 | ( |
@@ -32,8 +31,7 @@ discard block |
||
32 | 31 | get_class($this->object), |
33 | 32 | $property |
34 | 33 | ); |
35 | - } |
|
36 | - elseif (!$this->reflect->properties[$property]->readable) |
|
34 | + } elseif (!$this->reflect->properties[$property]->readable) |
|
37 | 35 | { |
38 | 36 | throw new PropertyNotReadableException |
39 | 37 | ( |
@@ -74,7 +74,7 @@ |
||
74 | 74 | * Builds the ReflectionProperty from the provided parameters, |
75 | 75 | * linking to a parent ReflectionComposite |
76 | 76 | * |
77 | - * @param ReflectionCompostite $parent The reflector for the class |
|
77 | + * @param ReflectionComposite $parent The reflector for the class |
|
78 | 78 | * this property belongs to |
79 | 79 | * @param mixed $default This property's default value |
80 | 80 | * @return ReflectionProperty |
@@ -29,8 +29,7 @@ |
||
29 | 29 | if ($offset === null) |
30 | 30 | { |
31 | 31 | $this->add($value); |
32 | - } |
|
33 | - else |
|
32 | + } else |
|
34 | 33 | { |
35 | 34 | $this->set($offset, $value); |
36 | 35 | } |
@@ -130,7 +130,7 @@ |
||
130 | 130 | * |
131 | 131 | * @param string $name |
132 | 132 | * @param bool $checkFile |
133 | - * @param string $singular |
|
133 | + * @param string $signular |
|
134 | 134 | */ |
135 | 135 | protected function addItems |
136 | 136 | ( |
@@ -174,8 +174,7 @@ |
||
174 | 174 | { |
175 | 175 | $key = $value; |
176 | 176 | $type = ''; |
177 | - } |
|
178 | - else |
|
177 | + } else |
|
179 | 178 | { |
180 | 179 | $key = substr($value, 0, $space); |
181 | 180 | $type = substr($value, $space); |
@@ -68,8 +68,7 @@ |
||
68 | 68 | if ($reflect->generics->empty()) |
69 | 69 | { |
70 | 70 | return $reflect->classname; |
71 | - } |
|
72 | - else |
|
71 | + } else |
|
73 | 72 | { |
74 | 73 | $items = []; |
75 | 74 | foreach ($reflect->generics as $generic) |
@@ -99,7 +99,7 @@ |
||
99 | 99 | * Infers the serialized name of the given ObjectType |
100 | 100 | * |
101 | 101 | * @param ObjectType $reflect |
102 | - * @return string |
|
102 | + * @return ClassName |
|
103 | 103 | */ |
104 | 104 | protected function inferObjectName(ObjectType $reflect) |
105 | 105 | { |
@@ -113,8 +113,7 @@ discard block |
||
113 | 113 | if ($stack->isEmpty()) |
114 | 114 | { |
115 | 115 | return $item; |
116 | - } |
|
117 | - else |
|
116 | + } else |
|
118 | 117 | { |
119 | 118 | $stack->top()->generics[] = $item; |
120 | 119 | } |
@@ -141,12 +140,10 @@ discard block |
||
141 | 140 | if ($i + 1 === strlen($value)) |
142 | 141 | { |
143 | 142 | throw new \Exception('Unexpected EOF'); |
144 | - } |
|
145 | - elseif ($value{$i + 1} !== ']') |
|
143 | + } elseif ($value{$i + 1} !== ']') |
|
146 | 144 | { |
147 | 145 | throw new \Exception('[ must be followed by ]'); |
148 | - } |
|
149 | - elseif ($i + 2 !== strlen($value)) |
|
146 | + } elseif ($i + 2 !== strlen($value)) |
|
150 | 147 | { |
151 | 148 | if (!in_array($value{$i + 2}, ['>',','])) |
152 | 149 | { |
@@ -245,12 +242,10 @@ discard block |
||
245 | 242 | if ($useStatements->containsKey($this->currentValue)) |
246 | 243 | { |
247 | 244 | return $useStatements[$this->currentValue]->classname; |
248 | - } |
|
249 | - elseif ($generics->containsKey($this->currentValue)) |
|
245 | + } elseif ($generics->containsKey($this->currentValue)) |
|
250 | 246 | { |
251 | 247 | return new GenericType($this->currentValue); |
252 | - } |
|
253 | - else |
|
248 | + } else |
|
254 | 249 | { |
255 | 250 | return $this->context->namespace->namespace |
256 | 251 | . '\\' . $this->currentValue; |
@@ -225,6 +225,9 @@ |
||
225 | 225 | : new ObjectType($context); |
226 | 226 | } |
227 | 227 | |
228 | + /** |
|
229 | + * @param string $var |
|
230 | + */ |
|
228 | 231 | public function scalarToType($var) : ?AbstractType |
229 | 232 | { |
230 | 233 | switch (strtolower($var)) |
@@ -37,8 +37,6 @@ discard block |
||
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 | { |
@@ -59,7 +57,7 @@ discard block |
||
59 | 57 | /** |
60 | 58 | * Checks if a key exists |
61 | 59 | * |
62 | - * @param KeyType $key The key to search for |
|
60 | + * @param string $key The key to search for |
|
63 | 61 | * @return boolean |
64 | 62 | */ |
65 | 63 | public function containsKey($key) : bool |
@@ -103,6 +101,9 @@ discard block |
||
103 | 101 | return $this->list->size(); |
104 | 102 | } |
105 | 103 | |
104 | + /** |
|
105 | + * @param string $key |
|
106 | + */ |
|
106 | 107 | public function indexOfKey($key) |
107 | 108 | { |
108 | 109 | return $this->getPair($key)->index; |