Skip to content

Commit

Permalink
[automated] Apply Coding Standard (#4402)
Browse files Browse the repository at this point in the history
Co-authored-by: TomasVotruba <TomasVotruba@users.noreply.github.com>
  • Loading branch information
TomasVotruba and TomasVotruba committed Jul 2, 2023
1 parent 6a53d48 commit 4a00084
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
3 changes: 2 additions & 1 deletion config/config.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?php

declare(strict_types=1);
use Symfony\Component\Console\Command\Command;

use Composer\Semver\VersionParser;

use Doctrine\Inflector\Inflector;
use Doctrine\Inflector\Rules\English\InflectorFactory;
use OndraM\CiDetector\CiDetector;
Expand Down Expand Up @@ -79,6 +79,7 @@
use Rector\Utils\Command\MissingInSetCommand;
use Rector\Utils\Command\OutsideAnySetCommand;
use Symfony\Component\Console\Application;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Style\SymfonyStyle;
use function Symfony\Component\DependencyInjection\Loader\Configurator\service;
use function Symfony\Component\DependencyInjection\Loader\Configurator\tagged_iterator;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,9 @@
*/
final class StrictArrayParamDimFetchRector extends AbstractRector
{
public function __construct(private readonly ParentClassMethodTypeOverrideGuard $parentClassMethodTypeOverrideGuard)
{
public function __construct(
private readonly ParentClassMethodTypeOverrideGuard $parentClassMethodTypeOverrideGuard
) {
}

public function getRuleDefinition(): RuleDefinition
Expand Down
5 changes: 3 additions & 2 deletions src/NodeAnalyzer/ExprAnalyzer.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

namespace Rector\Core\NodeAnalyzer;

use PHPStan\Type\UnionType;
use PhpParser\Node\Expr;
use PhpParser\Node\Expr\Array_;
use PhpParser\Node\Expr\ClassConstFetch;
Expand All @@ -16,6 +15,7 @@
use PhpParser\Node\Scalar\Encapsed;
use PHPStan\Analyser\Scope;
use PHPStan\Type\MixedType;
use PHPStan\Type\UnionType;
use Rector\Core\Enum\ObjectReference;
use Rector\Core\NodeManipulator\ArrayManipulator;
use Rector\NodeTypeResolver\Node\AttributeKey;
Expand Down Expand Up @@ -49,7 +49,8 @@ public function isNonTypedFromParam(Expr $expr): bool
return ! $nativeType->equals($type);
}

return ! $nativeType->isSuperTypeOf($type)->yes();
return ! $nativeType->isSuperTypeOf($type)
->yes();
}

public function isDynamicExpr(Expr $expr): bool
Expand Down

0 comments on commit 4a00084

Please sign in to comment.