Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/Formatters/ArrayParametersOverViewWith.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,11 @@ public function enterNode(Node $node): Node|int|null
$this->viewWith[] = [$node->getArgs()[0], $node->getArgs()[1]];
});

if (! $node instanceof Node\Expr\FuncCall) {
if (! $node instanceof FuncCall) {
return null;
}

if (! $node->name instanceof Node\Name) {
if (! $node->name instanceof Name) {
return null;
}

Expand Down Expand Up @@ -132,8 +132,8 @@ public function forViewChain($node, Closure $callback)
$parent = $parent->var;
}

if ($parent instanceof Node\Expr\FuncCall
&& $parent->name instanceof Node\Name
if ($parent instanceof FuncCall
&& $parent->name instanceof Name
&& $parent->name->toString() === 'view'
) {
return $callback($node);
Expand Down
4 changes: 2 additions & 2 deletions src/Formatters/NoLeadingSlashesOnRoutePaths.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ private function visitor(): NodeVisitorAbstract
{
public function enterNode(Node $node): Node|int|null
{
if (! $node instanceof Node\Expr\StaticCall) {
if (! $node instanceof StaticCall) {
return null;
}

Expand All @@ -64,7 +64,7 @@ public function enterNode(Node $node): Node|int|null
return null;
}

if (! $node->args[0]->value instanceof Node\Scalar\String_) {
if (! $node->args[0]->value instanceof String_) {
return null;
}

Expand Down
8 changes: 4 additions & 4 deletions src/Formatters/RequestHelperFunctionWherePossible.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,11 @@ public function enterNode(Node $node): Node|int|null
$this->requestGet = $node->getArgs()[0];
});

if (! $node instanceof Node\Expr\FuncCall) {
if (! $node instanceof FuncCall) {
return null;
}

if (! $node->name instanceof Node\Name) {
if (! $node->name instanceof Name) {
return null;
}

Expand Down Expand Up @@ -107,8 +107,8 @@ public function forRequestGet($node, Closure $callback)
$parent = $parent->var;
}

if ($parent instanceof Node\Expr\FuncCall
&& $parent->name instanceof Node\Name
if ($parent instanceof FuncCall
&& $parent->name instanceof Name
&& $parent->name->toString() === 'request'
) {
return $callback($node);
Expand Down
2 changes: 1 addition & 1 deletion src/Formatters/RequestValidation.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public function enterNode(Node $node): Node|int|null
return null;
}

if (! $node instanceof Node\Expr\MethodCall) {
if (! $node instanceof MethodCall) {
return null;
}

Expand Down
2 changes: 1 addition & 1 deletion tests/Linting/CanOutputLintsAsCheckstyleTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public function can_use_checkstyle_flag_without_lints()

$output = $commandTester->getDisplay();

$xml = new DOMDocument;
$xml = new DomDocument;
$xml->loadXML($output);
$this->assertEquals(0, $xml->getElementsByTagName('file')->length);
$this->assertEquals(0, $commandTester->getStatusCode());
Expand Down
Loading