@@ -84,7 +84,7 @@ |
||
84 | 84 | |
85 | 85 | /** |
86 | 86 | * @param Readable $input |
87 | - * @return \Traversable|TokenInterface[] |
|
87 | + * @return \Generator |
|
88 | 88 | */ |
89 | 89 | protected function exec(Readable $input): \Traversable |
90 | 90 | { |
@@ -72,7 +72,7 @@ |
||
72 | 72 | $this->map[$this->id] = $name; |
73 | 73 | $this->tokens[$this->id] = $pcre; |
74 | 74 | } catch (LexerException $e) { |
75 | - $message = \preg_replace('/rule\h+id\h+\d+/iu', 'token ' . $name, $e->getMessage()); |
|
75 | + $message = \preg_replace('/rule\h+id\h+\d+/iu', 'token '.$name, $e->getMessage()); |
|
76 | 76 | |
77 | 77 | throw new BadLexemeException($message); |
78 | 78 | } |
@@ -51,7 +51,7 @@ |
||
51 | 51 | } |
52 | 52 | |
53 | 53 | /** |
54 | - * @param int|null $offset |
|
54 | + * @param integer $offset |
|
55 | 55 | * @return string|null |
56 | 56 | */ |
57 | 57 | public function getValue(int $offset = 0): ?string |
@@ -35,7 +35,7 @@ |
||
35 | 35 | public function lex(Readable $input): \Traversable |
36 | 36 | { |
37 | 37 | foreach ($this->exec($input) as $token) { |
38 | - if (! \in_array($token->getName(), $this->skipped, true)) { |
|
38 | + if (!\in_array($token->getName(), $this->skipped, true)) { |
|
39 | 39 | yield $token; |
40 | 40 | } |
41 | 41 | } |