@@ -118,7 +118,7 @@ discard block |
||
| 118 | 118 | * Gets the previous token. Skips any irrelevant token (whitespaces and |
| 119 | 119 | * comments). |
| 120 | 120 | */ |
| 121 | - public function getPrevious(): Token|null |
|
| 121 | + public function getPrevious(): Token | null |
|
| 122 | 122 | { |
| 123 | 123 | for (; $this->idx >= 0; --$this->idx) { |
| 124 | 124 | if ( |
@@ -141,7 +141,7 @@ discard block |
||
| 141 | 141 | */ |
| 142 | 142 | public function getPreviousOfType($type) |
| 143 | 143 | { |
| 144 | - if (! is_array($type)) { |
|
| 144 | + if (!is_array($type)) { |
|
| 145 | 145 | $type = [$type]; |
| 146 | 146 | } |
| 147 | 147 | |
@@ -163,7 +163,7 @@ discard block |
||
| 163 | 163 | */ |
| 164 | 164 | public function getNextOfType($type) |
| 165 | 165 | { |
| 166 | - if (! is_array($type)) { |
|
| 166 | + if (!is_array($type)) { |
|
| 167 | 167 | $type = [$type]; |
| 168 | 168 | } |
| 169 | 169 | |
@@ -201,7 +201,7 @@ discard block |
||
| 201 | 201 | * @param int $type the type of the token |
| 202 | 202 | * @param int $flag the flag of the token |
| 203 | 203 | */ |
| 204 | - public function getNextOfTypeAndFlag(int $type, int $flag): Token|null |
|
| 204 | + public function getNextOfTypeAndFlag(int $type, int $flag): Token | null |
|
| 205 | 205 | { |
| 206 | 206 | for (; $this->idx < $this->count; ++$this->idx) { |
| 207 | 207 | if (($this->tokens[$this->idx]->type === $type) && ($this->tokens[$this->idx]->flags === $flag)) { |
@@ -39,7 +39,7 @@ discard block |
||
| 39 | 39 | { |
| 40 | 40 | foreach ($longopts as $value) { |
| 41 | 41 | $value = rtrim($value, ':'); |
| 42 | - if (! isset($params[$value])) { |
|
| 42 | + if (!isset($params[$value])) { |
|
| 43 | 43 | continue; |
| 44 | 44 | } |
| 45 | 45 | |
@@ -62,7 +62,7 @@ discard block |
||
| 62 | 62 | * |
| 63 | 63 | * @return string[]|false[]|false |
| 64 | 64 | */ |
| 65 | - public function getopt($opt, $long): array|false |
|
| 65 | + public function getopt($opt, $long): array | false |
|
| 66 | 66 | { |
| 67 | 67 | return getopt($opt, $long); |
| 68 | 68 | } |
@@ -84,11 +84,11 @@ discard block |
||
| 84 | 84 | } |
| 85 | 85 | |
| 86 | 86 | $this->mergeLongOpts($params, $longopts); |
| 87 | - if (! isset($params['f'])) { |
|
| 87 | + if (!isset($params['f'])) { |
|
| 88 | 88 | $params['f'] = 'cli'; |
| 89 | 89 | } |
| 90 | 90 | |
| 91 | - if (! in_array($params['f'], ['html', 'cli', 'text'])) { |
|
| 91 | + if (!in_array($params['f'], ['html', 'cli', 'text'])) { |
|
| 92 | 92 | echo "ERROR: Invalid value for format!\n"; |
| 93 | 93 | |
| 94 | 94 | return false; |
@@ -113,7 +113,7 @@ discard block |
||
| 113 | 113 | return 0; |
| 114 | 114 | } |
| 115 | 115 | |
| 116 | - if (! isset($params['q'])) { |
|
| 116 | + if (!isset($params['q'])) { |
|
| 117 | 117 | $stdIn = $this->readStdin(); |
| 118 | 118 | |
| 119 | 119 | if ($stdIn) { |
@@ -187,7 +187,7 @@ discard block |
||
| 187 | 187 | Context::load($params['c']); |
| 188 | 188 | } |
| 189 | 189 | |
| 190 | - if (! isset($params['q'])) { |
|
| 190 | + if (!isset($params['q'])) { |
|
| 191 | 191 | $stdIn = $this->readStdin(); |
| 192 | 192 | |
| 193 | 193 | if ($stdIn) { |
@@ -261,7 +261,7 @@ discard block |
||
| 261 | 261 | return 0; |
| 262 | 262 | } |
| 263 | 263 | |
| 264 | - if (! isset($params['q'])) { |
|
| 264 | + if (!isset($params['q'])) { |
|
| 265 | 265 | $stdIn = $this->readStdin(); |
| 266 | 266 | |
| 267 | 267 | if ($stdIn) { |
@@ -297,7 +297,7 @@ discard block |
||
| 297 | 297 | return 1; |
| 298 | 298 | } |
| 299 | 299 | |
| 300 | - public function readStdin(): string|false|null |
|
| 300 | + public function readStdin(): string | false | null |
|
| 301 | 301 | { |
| 302 | 302 | $read = [STDIN]; |
| 303 | 303 | $write = []; |