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

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?php
# its a .phtml file
?>
<tr<?php if (!$this->some()) echo ' class="border"' ?>>
<td></td>
</tr>
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
use PhpParser\Node\Stmt\ElseIf_;
use PhpParser\Node\Stmt\If_;
use PhpParser\Token;
use Rector\Contract\Rector\HTMLAverseRectorInterface;
use Rector\NodeTypeResolver\Node\AttributeKey;
use Rector\Rector\AbstractRector;
use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample;
Expand All @@ -18,7 +19,7 @@
/**
* @see \Rector\Tests\CodeQuality\Rector\If_\CompleteMissingIfElseBracketRector\CompleteMissingIfElseBracketRectorTest
*/
final class CompleteMissingIfElseBracketRector extends AbstractRector
final class CompleteMissingIfElseBracketRector extends AbstractRector implements HTMLAverseRectorInterface
{
public function getRuleDefinition(): RuleDefinition
{
Expand Down
3 changes: 2 additions & 1 deletion rules/Php86/Rector/FuncCall/MinMaxToClampRector.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

namespace Rector\Php86\Rector\FuncCall;

use PhpParser\Node\Identifier;
use PhpParser\Node;
use PhpParser\Node\Arg;
use PhpParser\Node\Expr;
Expand Down Expand Up @@ -129,7 +130,7 @@ private function createClampFuncCall(

private function isSupportedArg(Arg $arg): bool
{
return ! $arg->unpack && $arg->name === null;
return ! $arg->unpack && !$arg->name instanceof Identifier;
}

/**
Expand Down
4 changes: 2 additions & 2 deletions src/Rector/AbstractRector.php
Original file line number Diff line number Diff line change
Expand Up @@ -224,9 +224,9 @@ protected function getType(Node $node): Type
/**
* Use this method for getting native expr type
*/
protected function getNativeType(Expr $node): Type
protected function getNativeType(Expr $expr): Type
{
return $this->nodeTypeResolver->getNativeType($node);
return $this->nodeTypeResolver->getNativeType($expr);
}

/**
Expand Down
Loading