Skip to content

Commit

Permalink
Merge pull request #7 from WyriHaximus-labs/php-parser-3-and-4
Browse files Browse the repository at this point in the history
Support nikic/php-parser 3 and 4
  • Loading branch information
WyriHaximus authored Aug 20, 2018
2 parents a7052b7 + 4596c28 commit 185340b
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 @@ -58,7 +58,7 @@ private static function iterateStmts(array $stmts, string $dir, string $file): a
$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 185340b

Please sign in to comment.