@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | { |
37 | 37 | $this->lexer->moveNext(); |
38 | 38 | |
39 | - if (!$this->lexer->token) { |
|
39 | + if ( ! $this->lexer->token) { |
|
40 | 40 | throw new SyntaxError( |
41 | 41 | 'Syntax error, unexpected end of stream' |
42 | 42 | ); |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | return $this->visitArrayType(); |
58 | 58 | } |
59 | 59 | return $this->visitSimpleType(); |
60 | - } elseif (!$this->root && Lexer::T_ARRAY_START === $this->lexer->token['type']) { |
|
60 | + } elseif ( ! $this->root && Lexer::T_ARRAY_START === $this->lexer->token['type']) { |
|
61 | 61 | return $this->visitArrayType(); |
62 | 62 | } |
63 | 63 | |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | $this->match(Lexer::T_TYPE_START); |
85 | 85 | |
86 | 86 | $params = []; |
87 | - if (!$this->lexer->isNextToken(Lexer::T_TYPE_END)) { |
|
87 | + if ( ! $this->lexer->isNextToken(Lexer::T_TYPE_END)) { |
|
88 | 88 | while (true) { |
89 | 89 | $params[] = $this->visit(); |
90 | 90 | |
@@ -109,7 +109,7 @@ discard block |
||
109 | 109 | */ |
110 | 110 | |
111 | 111 | $params = []; |
112 | - if (!$this->lexer->isNextToken(Lexer::T_ARRAY_END)) { |
|
112 | + if ( ! $this->lexer->isNextToken(Lexer::T_ARRAY_END)) { |
|
113 | 113 | while (true) { |
114 | 114 | $params[] = $this->visit(); |
115 | 115 | if ($this->lexer->isNextToken(Lexer::T_ARRAY_END)) { |
@@ -124,7 +124,7 @@ discard block |
||
124 | 124 | |
125 | 125 | private function match(int $token): void |
126 | 126 | { |
127 | - if (!$this->lexer->lookahead) { |
|
127 | + if ( ! $this->lexer->lookahead) { |
|
128 | 128 | throw new SyntaxError( |
129 | 129 | sprintf('Syntax error, unexpected end of stream, expected %s', $this->getConstant($token)) |
130 | 130 | ); |
@@ -69,9 +69,9 @@ discard block |
||
69 | 69 | } |
70 | 70 | |
71 | 71 | if (null === $metadata->getter) { |
72 | - if (!isset($this->readAccessors[$metadata->class])) { |
|
72 | + if ( ! isset($this->readAccessors[$metadata->class])) { |
|
73 | 73 | if (true === $metadata->forceReflectionAccess) { |
74 | - $this->readAccessors[$metadata->class] = function ($o, $name) use ($metadata) { |
|
74 | + $this->readAccessors[$metadata->class] = function($o, $name) use ($metadata) { |
|
75 | 75 | $ref = $this->propertyReflectionCache[$metadata->class][$name] ?? null; |
76 | 76 | if (null === $ref) { |
77 | 77 | $ref = new \ReflectionProperty($metadata->class, $name); |
@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | return $ref->getValue($o); |
83 | 83 | }; |
84 | 84 | } else { |
85 | - $this->readAccessors[$metadata->class] = \Closure::bind(static function ($o, $name) { |
|
85 | + $this->readAccessors[$metadata->class] = \Closure::bind(static function($o, $name) { |
|
86 | 86 | $ref = new \ReflectionProperty($o, $name); |
87 | 87 | return $ref->isStatic() ? $o::$name : $o->$name; |
88 | 88 | }, null, $metadata->class); |
@@ -105,9 +105,9 @@ discard block |
||
105 | 105 | } |
106 | 106 | |
107 | 107 | if (null === $metadata->setter) { |
108 | - if (!isset($this->writeAccessors[$metadata->class])) { |
|
108 | + if ( ! isset($this->writeAccessors[$metadata->class])) { |
|
109 | 109 | if (true === $metadata->forceReflectionAccess) { |
110 | - $this->writeAccessors[$metadata->class] = function ($o, $name, $value) use ($metadata): void { |
|
110 | + $this->writeAccessors[$metadata->class] = function($o, $name, $value) use ($metadata): void { |
|
111 | 111 | $ref = $this->propertyReflectionCache[$metadata->class][$name] ?? null; |
112 | 112 | if (null === $ref) { |
113 | 113 | $ref = new \ReflectionProperty($metadata->class, $name); |
@@ -118,7 +118,7 @@ discard block |
||
118 | 118 | $ref->setValue($o, $value); |
119 | 119 | }; |
120 | 120 | } else { |
121 | - $this->writeAccessors[$metadata->class] = \Closure::bind(static function ($o, $name, $value): void { |
|
121 | + $this->writeAccessors[$metadata->class] = \Closure::bind(static function($o, $name, $value): void { |
|
122 | 122 | $o->$name = $value; |
123 | 123 | }, null, $metadata->class); |
124 | 124 | } |