@@ -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 | } |
@@ -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 | } |
@@ -21,7 +21,7 @@ |
||
21 | 21 | { |
22 | 22 | return [ |
23 | 23 | static::ROOT_TYPE => $any = self::createInternalType(static::ROOT_TYPE), |
24 | - static::INTERFACE => $interface = self::createInternalType(static::INTERFACE), |
|
24 | + static::interface => $interface = self::createInternalType(static::interface), |
|
25 | 25 | static::OBJECT => $object = self::createInternalType(static::OBJECT, $interface), |
26 | 26 | static::INPUT_OBJECT => $input = self::createInternalType(static::INPUT_OBJECT, $object), |
27 | 27 | static::UNION => $union = self::createInternalType(static::UNION, $object), |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | * @param VarSymbolInterface $record |
34 | 34 | * @return int |
35 | 35 | */ |
36 | - public function declare(VarSymbolInterface $record): int |
|
36 | + public function declare(VarSymbolInterface$record): int |
|
37 | 37 | { |
38 | 38 | $id = $this->id++; |
39 | 39 | |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | */ |
50 | 50 | public function fetch(int $addr): VarSymbolInterface |
51 | 51 | { |
52 | - if (! isset($this->variables[$addr])) { |
|
52 | + if (!isset($this->variables[$addr])) { |
|
53 | 53 | $error = \sprintf('Mismatched variable address 0x%08x', $addr); |
54 | 54 | throw new NotFoundException($error); |
55 | 55 | } |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | { |
75 | 75 | $variables = []; |
76 | 76 | foreach ($this->variables as $id => $var) { |
77 | - $variables[$id] = (string)$var; |
|
77 | + $variables[$id] = (string) $var; |
|
78 | 78 | } |
79 | 79 | |
80 | 80 | return [ |
@@ -14,7 +14,7 @@ discard block |
||
14 | 14 | use Railt\Reflection\Contracts\Document; |
15 | 15 | use Railt\SDL\Exception\CompilerException; |
16 | 16 | |
17 | -if (! \function_exists('sdl')) { |
|
17 | +if (!\function_exists('sdl')) { |
|
18 | 18 | /** |
19 | 19 | * @param string $fileOrSources |
20 | 20 | * @param bool $filename |
@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | } |
31 | 31 | } |
32 | 32 | |
33 | -if (! \function_exists('object_to_string')) { |
|
33 | +if (!\function_exists('object_to_string')) { |
|
34 | 34 | /** |
35 | 35 | * @param object $object |
36 | 36 | * @return string |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | : \spl_object_hash($object); |
45 | 45 | |
46 | 46 | if (is_renderable($object)) { |
47 | - return \sprintf('%s(%s)#%s', \get_class($object), (string)$object, $hash); |
|
47 | + return \sprintf('%s(%s)#%s', \get_class($object), (string) $object, $hash); |
|
48 | 48 | } |
49 | 49 | |
50 | 50 | return \sprintf('%s#%s', \get_class($object), $hash); |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | } |
53 | 53 | |
54 | 54 | |
55 | -if (! \function_exists('is_renderable')) { |
|
55 | +if (!\function_exists('is_renderable')) { |
|
56 | 56 | /** |
57 | 57 | * @param mixed $value |
58 | 58 | * @return bool |
@@ -56,20 +56,20 @@ |
||
56 | 56 | public static function new($name, bool $global = null): TypeNameInterface |
57 | 57 | { |
58 | 58 | switch (true) { |
59 | - case $name === null || ! $name: |
|
60 | - return static::empty((bool)$global); |
|
59 | + case $name === null || !$name: |
|
60 | + return static::empty((bool) $global); |
|
61 | 61 | |
62 | 62 | case $name instanceof TypeNameInterface: |
63 | 63 | return $name; |
64 | 64 | |
65 | 65 | case \is_array($name): |
66 | - return static::fromArray($name, (bool)$global); |
|
66 | + return static::fromArray($name, (bool) $global); |
|
67 | 67 | |
68 | 68 | case \is_iterable($name): |
69 | - return static::fromArray(\iterator_to_array($name, false), (bool)$global); |
|
69 | + return static::fromArray(\iterator_to_array($name, false), (bool) $global); |
|
70 | 70 | |
71 | 71 | case \is_scalar($name): |
72 | - return static::fromString((string)$name, $global); |
|
72 | + return static::fromString((string) $name, $global); |
|
73 | 73 | |
74 | 74 | default: |
75 | 75 | $error = 'Unsupported argument type of %s(self|array|iterable|scalar $name = %s)'; |