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
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,11 @@ public function shouldSkip(
}

// check if args require by reference
$parameters = ParametersAcceptorSelectorVariantsWrapper::select($reflection, $callLike, $scope)->getParameters();
$parameters = ParametersAcceptorSelectorVariantsWrapper::select(
$reflection,
$callLike,
$scope
)->getParameters();
foreach ($parameters as $parameter) {
if ($parameter->passedByReference()->yes()) {
return true;
Expand Down
12 changes: 8 additions & 4 deletions rules/Php80/NodeAnalyzer/PhpAttributeAnalyzer.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,10 @@ public function __construct(
) {
}

public function hasPhpAttribute(Property | ClassLike | ClassMethod | Function_ | Param $node, string $attributeClass): bool
{
public function hasPhpAttribute(
Property | ClassLike | ClassMethod | Function_ | Param $node,
string $attributeClass
): bool {
foreach ($node->attrGroups as $attrGroup) {
foreach ($attrGroup->attrs as $attribute) {
if (! $this->nodeNameResolver->isName($attribute->name, $attributeClass)) {
Expand All @@ -42,8 +44,10 @@ public function hasPhpAttribute(Property | ClassLike | ClassMethod | Function_ |
/**
* @param string[] $attributeClasses
*/
public function hasPhpAttributes(Property | ClassLike | ClassMethod | Function_ | Param $node, array $attributeClasses): bool
{
public function hasPhpAttributes(
Property | ClassLike | ClassMethod | Function_ | Param $node,
array $attributeClasses
): bool {
foreach ($attributeClasses as $attributeClass) {
if ($this->hasPhpAttribute($node, $attributeClass)) {
return true;
Expand Down
4 changes: 2 additions & 2 deletions rules/Php86/Rector/FuncCall/MinMaxToClampRector.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@

namespace Rector\Php86\Rector\FuncCall;

use PhpParser\Node\Identifier;
use PhpParser\Node;
use PhpParser\Node\Arg;
use PhpParser\Node\Expr;
use PhpParser\Node\Expr\FuncCall;
use PhpParser\Node\Identifier;
use Rector\Rector\AbstractRector;
use Rector\ValueObject\PhpVersionFeature;
use Rector\VersionBonding\Contract\MinPhpVersionInterface;
Expand Down Expand Up @@ -130,7 +130,7 @@ private function createClampFuncCall(

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

/**
Expand Down
Loading