Skip to content

Commit

Permalink
Support nikic/php-parser 3 and 4
Browse files Browse the repository at this point in the history
  • Loading branch information
WyriHaximus committed Aug 16, 2018
1 parent 2b84f80 commit 4596c28
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"php": "^7.0",
"recoil/react": "^1.0",
"recoil/recoil": "^1.0",
"nikic/php-parser": "^3.1",
"nikic/php-parser": "^4.0 || ^3.1",
"psr/http-server-middleware": "^1.0"
},
"require-dev": {
Expand Down
2 changes: 1 addition & 1 deletion src/YieldingMiddlewareFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ private static function iterateStmts(array $stmts): array
$stmt->implements = [];
}

if ($stmt instanceof ClassMethod && $stmt->name === 'process') {
if ($stmt instanceof ClassMethod && (string)$stmt->name === 'process') {
$stmt->returnType = null;
$stmt->params[1]->type = null;
}
Expand Down

0 comments on commit 4596c28

Please sign in to comment.