@@ -128,7 +128,7 @@ |
||
| 128 | 128 | * @param TypeInterface|null $type |
| 129 | 129 | * @return VarSymbolInterface |
| 130 | 130 | */ |
| 131 | - public function declare(string $var, TypeInterface $type = null): VarSymbolInterface |
|
| 131 | + public function declare(string$var,TypeInterface$type=null): VarSymbolInterface |
|
| 132 | 132 | { |
| 133 | 133 | $record = new VarSymbol($var, $type); |
| 134 | 134 | |
@@ -48,7 +48,7 @@ |
||
| 48 | 48 | */ |
| 49 | 49 | protected function verified(string $name): string |
| 50 | 50 | { |
| 51 | - if (! \preg_match('/^[_a-zA-Z][_a-zA-Z0-9]*$/', $name)) { |
|
| 51 | + if (!\preg_match('/^[_a-zA-Z][_a-zA-Z0-9]*$/', $name)) { |
|
| 52 | 52 | $error = \sprintf('Names must match /^[_a-zA-Z][_a-zA-Z0-9]*$/ but "%s" does not.', $name); |
| 53 | 53 | throw new SemanticException($error); |
| 54 | 54 | } |
@@ -149,7 +149,7 @@ discard block |
||
| 149 | 149 | */ |
| 150 | 150 | public function offsetExists($offset): bool |
| 151 | 151 | { |
| 152 | - return $this->has((string)$offset); |
|
| 152 | + return $this->has((string) $offset); |
|
| 153 | 153 | } |
| 154 | 154 | |
| 155 | 155 | /** |
@@ -158,7 +158,7 @@ discard block |
||
| 158 | 158 | */ |
| 159 | 159 | public function offsetGet($offset) |
| 160 | 160 | { |
| 161 | - return $this->get((string)$offset); |
|
| 161 | + return $this->get((string) $offset); |
|
| 162 | 162 | } |
| 163 | 163 | |
| 164 | 164 | /** |
@@ -167,7 +167,7 @@ discard block |
||
| 167 | 167 | */ |
| 168 | 168 | public function offsetSet($offset, $value): void |
| 169 | 169 | { |
| 170 | - $this->set((string)$offset, $value); |
|
| 170 | + $this->set((string) $offset, $value); |
|
| 171 | 171 | } |
| 172 | 172 | |
| 173 | 173 | /** |
@@ -175,6 +175,6 @@ discard block |
||
| 175 | 175 | */ |
| 176 | 176 | public function offsetUnset($offset): void |
| 177 | 177 | { |
| 178 | - $this->delete((string)$offset); |
|
| 178 | + $this->delete((string) $offset); |
|
| 179 | 179 | } |
| 180 | 180 | } |
@@ -20,7 +20,7 @@ |
||
| 20 | 20 | * @param VarSymbolInterface $record |
| 21 | 21 | * @return int |
| 22 | 22 | */ |
| 23 | - public function declare(VarSymbolInterface $record): int; |
|
| 23 | + public function declare(VarSymbolInterface$record): int; |
|
| 24 | 24 | |
| 25 | 25 | /** |
| 26 | 26 | * @param int $addr |
@@ -28,6 +28,6 @@ |
||
| 28 | 28 | */ |
| 29 | 29 | public function __toString(): string |
| 30 | 30 | { |
| 31 | - return '[' . $this->of . ']'; |
|
| 31 | + return '['.$this->of.']'; |
|
| 32 | 32 | } |
| 33 | 33 | } |
@@ -20,7 +20,7 @@ |
||
| 20 | 20 | */ |
| 21 | 21 | public function __construct(TypeInterface $of) |
| 22 | 22 | { |
| 23 | - parent::__construct(static::LIST, $of); |
|
| 23 | + parent::__construct(static::list, $of); |
|
| 24 | 24 | } |
| 25 | 25 | |
| 26 | 26 | /** |
@@ -65,7 +65,7 @@ |
||
| 65 | 65 | { |
| 66 | 66 | \assert(Name::isValid($name), 'Interface is not generic type'); |
| 67 | 67 | |
| 68 | - $interface = static::new(static::INTERFACE); |
|
| 68 | + $interface = static::new(static::interface); |
|
| 69 | 69 | |
| 70 | 70 | return $name ? static::new($name, $interface) : $interface; |
| 71 | 71 | } |
@@ -69,6 +69,6 @@ |
||
| 69 | 69 | */ |
| 70 | 70 | public static function null(): TypeInterface |
| 71 | 71 | { |
| 72 | - return static::new(static::NULL); |
|
| 72 | + return static::new(static::null); |
|
| 73 | 73 | } |
| 74 | 74 | } |
@@ -50,7 +50,7 @@ |
||
| 50 | 50 | protected static function getInternalType(string $name, ?TypeInterface $of, \Closure $otherwise): TypeInterface |
| 51 | 51 | { |
| 52 | 52 | if (isset(static::$internal[$name])) { |
| 53 | - $subtypeOfInternal = ! $of || $of->typeOf(static::$internal[$name]); |
|
| 53 | + $subtypeOfInternal = !$of || $of->typeOf(static::$internal[$name]); |
|
| 54 | 54 | |
| 55 | 55 | return $subtypeOfInternal ? static::$internal[$name] : $otherwise(); |
| 56 | 56 | } |
@@ -22,7 +22,7 @@ discard block |
||
| 22 | 22 | { |
| 23 | 23 | parent::__construct(static::NON_NULL, $parent); |
| 24 | 24 | |
| 25 | - \assert(! $this->is($parent), __CLASS__ . ' can not be wrapped by itself'); |
|
| 25 | + \assert(!$this->is($parent), __CLASS__.' can not be wrapped by itself'); |
|
| 26 | 26 | } |
| 27 | 27 | |
| 28 | 28 | /** |
@@ -30,6 +30,6 @@ discard block |
||
| 30 | 30 | */ |
| 31 | 31 | public function __toString(): string |
| 32 | 32 | { |
| 33 | - return $this->of . '!'; |
|
| 33 | + return $this->of.'!'; |
|
| 34 | 34 | } |
| 35 | 35 | } |