Skip to content

Commit

Permalink
cs
Browse files Browse the repository at this point in the history
  • Loading branch information
TomasVotruba committed Dec 6, 2024
1 parent 3051615 commit f061193
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 7 deletions.
2 changes: 0 additions & 2 deletions src/Collectors/Callable_/CallableTypeCollector.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

use PhpParser\Node;
use PhpParser\Node\Expr;
use PhpParser\Node\Expr\FuncCall;
use PHPStan\Analyser\Scope;
use PHPStan\Collectors\Collector;
use PHPStan\Reflection\ClassReflection;
Expand Down Expand Up @@ -72,5 +71,4 @@ public function processNode(Node $node, Scope $scope): ?array

return $classMethodReferences;
}

}
2 changes: 1 addition & 1 deletion src/Collectors/PublicClassLikeConstCollector.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public function processNode(Node $node, Scope $scope): ?array
$constantNames[] = [$classReflection->getName(), $constConst->name->toString(), $node->getLine()];
}

if ([] === $constantNames) {
if ($constantNames === []) {
return null;
}

Expand Down
2 changes: 1 addition & 1 deletion src/Rules/UnusedPublicClassConstRule.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public function processNode(Node $node, Scope $scope): array
if ($declarationGroup === null) {
continue;
}

foreach ($declarationGroup as [$className, $constantName, $line]) {
if ($this->isClassConstantUsed(
$className,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,6 @@

myFunc([$caller1, 'callIt']);

function myFunc(callable $c) {}
function myFunc(callable $c)
{
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
$c = new MyClass();
$c->myMethod([$caller1, 'callIt']);

class MyClass {
function myMethod(callable $c) {}
class MyClass
{
public function myMethod(callable $c)
{
}
}

0 comments on commit f061193

Please sign in to comment.