Skip to content

Commit

Permalink
fix phpstan errors, add it to ci
Browse files Browse the repository at this point in the history
  • Loading branch information
felixdorn committed Nov 5, 2021
1 parent 3b22716 commit 5446227
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 5 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/formats.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,6 @@ jobs:

- name: Coding Style Checks
run: composer test:lint

- name: Type Checks
run: composer test:types
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
"test:unit": "pest --colors=always",
"test": [
"@test:lint",
"@test:types",
"@test:unit"
]
}
Expand Down
1 change: 0 additions & 1 deletion src/Contracts/Token.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
namespace Felix\Sey\Contracts;

use Felix\Sey\Runtime;
use Felix\Sey\Tokens\NullToken;

abstract class Token
{
Expand Down
5 changes: 2 additions & 3 deletions src/Runtime.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,8 @@ public function __construct(string $expression, array $variables, array $functio

public function run(): string
{
while ($this->tokens->current() !== null) {
$this->tokens->current()->consume($this);
$this->tokens->next();
foreach ($this->tokens as $token) {
$token->consume($this);
}

// no more tokens to read but some operators are still in the stack
Expand Down
1 change: 0 additions & 1 deletion src/Tokens/Comma.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ class Comma extends Token
{
public function __construct(public string $value = ',')
{

}

public function consume(Runtime $runtime): void
Expand Down

0 comments on commit 5446227

Please sign in to comment.