Skip to content

Commit

Permalink
fixup! feature: Add global_namespace_import to @symfony ruleset
Browse files Browse the repository at this point in the history
  • Loading branch information
julienfalque committed Oct 27, 2022
1 parent fb916a0 commit d0216d8
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 9 deletions.
5 changes: 2 additions & 3 deletions src/ConfigInterface.php
Expand Up @@ -15,7 +15,6 @@
namespace PhpCsFixer;

use PhpCsFixer\Fixer\FixerInterface;
use SplFileInfo;

/**
* @author Fabien Potencier <fabien@symfony.com>
Expand All @@ -40,7 +39,7 @@ public function getCustomFixers(): array;
/**
* Returns files to scan.
*
* @return iterable<SplFileInfo>
* @return iterable<\SplFileInfo>
*/
public function getFinder(): iterable;

Expand Down Expand Up @@ -103,7 +102,7 @@ public function registerCustomFixers(iterable $fixers): self;
public function setCacheFile(string $cacheFile): self;

/**
* @param iterable<SplFileInfo> $finder
* @param iterable<\SplFileInfo> $finder
*/
public function setFinder(iterable $finder): self;

Expand Down
3 changes: 1 addition & 2 deletions src/Console/Command/ListFilesCommand.php
Expand Up @@ -18,7 +18,6 @@
use PhpCsFixer\ConfigInterface;
use PhpCsFixer\Console\ConfigurationResolver;
use PhpCsFixer\ToolInfoInterface;
use SplFileInfo;
use Symfony\Component\Console\Attribute\AsCommand;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
Expand Down Expand Up @@ -81,7 +80,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int

$finder = $resolver->getFinder();

/** @var SplFileInfo $file */
/** @var \SplFileInfo $file */
foreach ($finder as $file) {
if ($file->isFile()) {
$relativePath = str_replace($cwd, '.', $file->getRealPath());
Expand Down
3 changes: 1 addition & 2 deletions tests/FixerFactoryTest.php
Expand Up @@ -21,7 +21,6 @@
use PhpCsFixer\RuleSet\RuleSet;
use PhpCsFixer\RuleSet\RuleSetInterface;
use PhpCsFixer\WhitespacesFixerConfig;
use stdClass;

/**
* @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
Expand Down Expand Up @@ -375,7 +374,7 @@ public function provideConfigureFixerWithNonArrayCases(): array
{
return [
['bar'],
[new stdClass()],
[new \stdClass()],
[5],
[5.5],
];
Expand Down
3 changes: 1 addition & 2 deletions tests/Tokenizer/Analyzer/AlternativeSyntaxAnalyzerTest.php
Expand Up @@ -14,7 +14,6 @@

namespace PhpCsFixer\Tests\Tokenizer\Analyzer;

use InvalidArgumentException;
use PhpCsFixer\Tests\TestCase;
use PhpCsFixer\Tokenizer\Analyzer\AlternativeSyntaxAnalyzer;
use PhpCsFixer\Tokenizer\Tokens;
Expand Down Expand Up @@ -190,7 +189,7 @@ public function testItThrowsOnInvalidAlternativeSyntaxBlockStartIndex(string $co

$analyzer = new AlternativeSyntaxAnalyzer();

$this->expectException(InvalidArgumentException::class);
$this->expectException(\InvalidArgumentException::class);
$this->expectExceptionMessage($expectedMessage);

$analyzer->findAlternativeSyntaxBlockEnd($tokens, $startIndex);
Expand Down

0 comments on commit d0216d8

Please sign in to comment.