@@ -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) |
@@ -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); |
@@ -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; |
@@ -41,12 +41,10 @@ |
||
| 41 | 41 | if ($parent instanceof MixedType) |
| 42 | 42 | { |
| 43 | 43 | return true; |
| 44 | - } |
|
| 45 | - elseif ($parent instanceof ScalarType) |
|
| 44 | + } elseif ($parent instanceof ScalarType) |
|
| 46 | 45 | { |
| 47 | 46 | return get_class($parent) === get_class($child); |
| 48 | - } |
|
| 49 | - elseif ($parent instanceof ObjectType) |
|
| 47 | + } elseif ($parent instanceof ObjectType) |
|
| 50 | 48 | { |
| 51 | 49 | return |
| 52 | 50 | $child instanceof ObjectType && |
@@ -97,7 +97,7 @@ |
||
| 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 | : ('')))) |
@@ -65,7 +65,7 @@ discard block |
||
| 65 | 65 | $i = 0; |
| 66 | 66 | |
| 67 | 67 | $code = |
| 68 | - '<?php namespace ' . $namespace . ';' |
|
| 68 | + '<?php namespace ' . $namespace . ';' |
|
| 69 | 69 | . 'class ' . $baseClass . ' extends ' . $originalClass |
| 70 | 70 | . '{'; |
| 71 | 71 | |
@@ -107,7 +107,7 @@ discard block |
||
| 107 | 107 | } |
| 108 | 108 | |
| 109 | 109 | return |
| 110 | - ($method->scope === 'static' ? 'static ' : '') |
|
| 110 | + ($method->scope === 'static' ? 'static ' : '') |
|
| 111 | 111 | . 'function ' . $method->name |
| 112 | 112 | . '(' . implode(',', $params) . '){' |
| 113 | 113 | . '__generic_' . $method->name |
@@ -89,8 +89,7 @@ |
||
| 89 | 89 | if (!$param->type instanceof GenericType) |
| 90 | 90 | { |
| 91 | 91 | $type = $param->type; |
| 92 | - } |
|
| 93 | - else |
|
| 92 | + } else |
|
| 94 | 93 | { |
| 95 | 94 | $index = $this->reflect->generics->indexOfKey |
| 96 | 95 | ( |