Skip to content

Commit

Permalink
ECS 10.2.4
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user committed May 14, 2022
1 parent 8a1bdf4 commit 0a5eccd
Show file tree
Hide file tree
Showing 1,141 changed files with 10,383 additions and 10,383 deletions.
2 changes: 1 addition & 1 deletion bin/ecs
@@ -1,5 +1,5 @@
#!/usr/bin/env php
<?php
namespace ECSPrefix20220513;
namespace ECSPrefix20220514;

require __DIR__ . '/ecs.php';
18 changes: 9 additions & 9 deletions bin/ecs.php
@@ -1,20 +1,20 @@
<?php

declare (strict_types=1);
namespace ECSPrefix20220513;
namespace ECSPrefix20220514;

// decoupled in own "*.php" file, so ECS, Rector and PHPStan works out of the box here
use PHP_CodeSniffer\Util\Tokens;
use ECSPrefix20220513\Symfony\Component\Console\Command\Command;
use ECSPrefix20220513\Symfony\Component\Console\Input\ArgvInput;
use ECSPrefix20220514\Symfony\Component\Console\Command\Command;
use ECSPrefix20220514\Symfony\Component\Console\Input\ArgvInput;
use Symplify\EasyCodingStandard\Console\EasyCodingStandardConsoleApplication;
use Symplify\EasyCodingStandard\DependencyInjection\EasyCodingStandardContainerFactory;
use ECSPrefix20220513\Symplify\PackageBuilder\Console\Style\SymfonyStyleFactory;
use ECSPrefix20220514\Symplify\PackageBuilder\Console\Style\SymfonyStyleFactory;
// performance boost
\gc_disable();
\define('__ECS_RUNNING__', \true);
# 1. autoload
$autoloadIncluder = new \ECSPrefix20220513\AutoloadIncluder();
$autoloadIncluder = new \ECSPrefix20220514\AutoloadIncluder();
if (\file_exists(__DIR__ . '/../preload.php')) {
require_once __DIR__ . '/../preload.php';
}
Expand Down Expand Up @@ -108,17 +108,17 @@ public function loadIfNotLoadedYet(string $file) : void
/**
* Inspired by https://github.com/rectorphp/rector/pull/2373/files#diff-0fc04a2bb7928cac4ae339d5a8bf67f3
*/
\class_alias('ECSPrefix20220513\\AutoloadIncluder', 'AutoloadIncluder', \false);
\class_alias('ECSPrefix20220514\\AutoloadIncluder', 'AutoloadIncluder', \false);
try {
$input = new \ECSPrefix20220513\Symfony\Component\Console\Input\ArgvInput();
$input = new \ECSPrefix20220514\Symfony\Component\Console\Input\ArgvInput();
$ecsContainerFactory = new \Symplify\EasyCodingStandard\DependencyInjection\EasyCodingStandardContainerFactory();
$container = $ecsContainerFactory->createFromFromInput($input);
} catch (\Throwable $throwable) {
$symfonyStyleFactory = new \ECSPrefix20220513\Symplify\PackageBuilder\Console\Style\SymfonyStyleFactory();
$symfonyStyleFactory = new \ECSPrefix20220514\Symplify\PackageBuilder\Console\Style\SymfonyStyleFactory();
$symfonyStyle = $symfonyStyleFactory->create();
$symfonyStyle->error($throwable->getMessage());
$symfonyStyle->writeln($throwable->getTraceAsString());
exit(\ECSPrefix20220513\Symfony\Component\Console\Command\Command::FAILURE);
exit(\ECSPrefix20220514\Symfony\Component\Console\Command\Command::FAILURE);
}
$application = $container->get(\Symplify\EasyCodingStandard\Console\EasyCodingStandardConsoleApplication::class);
exit($application->run());
46 changes: 23 additions & 23 deletions config/config.php
@@ -1,14 +1,14 @@
<?php

declare (strict_types=1);
namespace ECSPrefix20220513;
namespace ECSPrefix20220514;

use PHP_CodeSniffer\Fixer;
use PhpCsFixer\Differ\DifferInterface;
use PhpCsFixer\Differ\UnifiedDiffer;
use PhpCsFixer\WhitespacesFixerConfig;
use ECSPrefix20220513\Symfony\Component\Console\Style\SymfonyStyle;
use ECSPrefix20220513\Symfony\Component\Console\Terminal;
use ECSPrefix20220514\Symfony\Component\Console\Style\SymfonyStyle;
use ECSPrefix20220514\Symfony\Component\Console\Terminal;
use Symplify\EasyCodingStandard\Application\Version\StaticVersionResolver;
use Symplify\EasyCodingStandard\Caching\Cache;
use Symplify\EasyCodingStandard\Caching\CacheFactory;
Expand All @@ -18,14 +18,14 @@
use Symplify\EasyCodingStandard\FixerRunner\Application\FixerFileProcessor;
use Symplify\EasyCodingStandard\FixerRunner\WhitespacesFixerConfigFactory;
use Symplify\EasyCodingStandard\ValueObject\Option;
use ECSPrefix20220513\Symplify\PackageBuilder\Console\Style\SymfonyStyleFactory;
use ECSPrefix20220513\Symplify\PackageBuilder\Yaml\ParametersMerger;
use ECSPrefix20220513\Symplify\SmartFileSystem\FileSystemFilter;
use ECSPrefix20220513\Symplify\SmartFileSystem\FileSystemGuard;
use ECSPrefix20220513\Symplify\SmartFileSystem\Finder\FinderSanitizer;
use ECSPrefix20220513\Symplify\SmartFileSystem\Finder\SmartFinder;
use ECSPrefix20220513\Symplify\SmartFileSystem\SmartFileSystem;
use function ECSPrefix20220513\Symfony\Component\DependencyInjection\Loader\Configurator\service;
use ECSPrefix20220514\Symplify\PackageBuilder\Console\Style\SymfonyStyleFactory;
use ECSPrefix20220514\Symplify\PackageBuilder\Yaml\ParametersMerger;
use ECSPrefix20220514\Symplify\SmartFileSystem\FileSystemFilter;
use ECSPrefix20220514\Symplify\SmartFileSystem\FileSystemGuard;
use ECSPrefix20220514\Symplify\SmartFileSystem\Finder\FinderSanitizer;
use ECSPrefix20220514\Symplify\SmartFileSystem\Finder\SmartFinder;
use ECSPrefix20220514\Symplify\SmartFileSystem\SmartFileSystem;
use function ECSPrefix20220514\Symfony\Component\DependencyInjection\Loader\Configurator\service;
return static function (\Symplify\EasyCodingStandard\Config\ECSConfig $ecsConfig) : void {
$parameters = $ecsConfig->parameters();
$ecsConfig->indentation(\Symplify\EasyCodingStandard\ValueObject\Option::INDENTATION_SPACES);
Expand Down Expand Up @@ -60,18 +60,18 @@
__DIR__ . '/../src/Testing',
]);
$services->load('Symplify\\EasyCodingStandard\\', __DIR__ . '/../packages')->exclude([__DIR__ . '/../packages/*/ValueObject/*']);
$services->set(\Symplify\EasyCodingStandard\Caching\Cache::class)->factory([\ECSPrefix20220513\Symfony\Component\DependencyInjection\Loader\Configurator\service(\Symplify\EasyCodingStandard\Caching\CacheFactory::class), 'create']);
$services->set(\ECSPrefix20220513\Symfony\Component\Console\Terminal::class);
$services->set(\ECSPrefix20220513\Symplify\SmartFileSystem\FileSystemGuard::class);
$services->set(\ECSPrefix20220513\Symplify\SmartFileSystem\Finder\FinderSanitizer::class);
$services->set(\ECSPrefix20220513\Symplify\SmartFileSystem\SmartFileSystem::class);
$services->set(\ECSPrefix20220513\Symplify\SmartFileSystem\Finder\SmartFinder::class);
$services->set(\ECSPrefix20220513\Symplify\SmartFileSystem\FileSystemFilter::class);
$services->set(\ECSPrefix20220513\Symplify\PackageBuilder\Console\Style\SymfonyStyleFactory::class);
$services->set(\ECSPrefix20220513\Symfony\Component\Console\Style\SymfonyStyle::class)->factory([\ECSPrefix20220513\Symfony\Component\DependencyInjection\Loader\Configurator\service(\ECSPrefix20220513\Symplify\PackageBuilder\Console\Style\SymfonyStyleFactory::class), 'create']);
$services->set(\ECSPrefix20220513\Symplify\PackageBuilder\Yaml\ParametersMerger::class);
$services->set(\Symplify\EasyCodingStandard\Console\Style\EasyCodingStandardStyle::class)->factory([\ECSPrefix20220513\Symfony\Component\DependencyInjection\Loader\Configurator\service(\Symplify\EasyCodingStandard\Console\Style\EasyCodingStandardStyleFactory::class), 'create']);
$services->set(\PhpCsFixer\WhitespacesFixerConfig::class)->factory([\ECSPrefix20220513\Symfony\Component\DependencyInjection\Loader\Configurator\service(\Symplify\EasyCodingStandard\FixerRunner\WhitespacesFixerConfigFactory::class), 'create']);
$services->set(\Symplify\EasyCodingStandard\Caching\Cache::class)->factory([\ECSPrefix20220514\Symfony\Component\DependencyInjection\Loader\Configurator\service(\Symplify\EasyCodingStandard\Caching\CacheFactory::class), 'create']);
$services->set(\ECSPrefix20220514\Symfony\Component\Console\Terminal::class);
$services->set(\ECSPrefix20220514\Symplify\SmartFileSystem\FileSystemGuard::class);
$services->set(\ECSPrefix20220514\Symplify\SmartFileSystem\Finder\FinderSanitizer::class);
$services->set(\ECSPrefix20220514\Symplify\SmartFileSystem\SmartFileSystem::class);
$services->set(\ECSPrefix20220514\Symplify\SmartFileSystem\Finder\SmartFinder::class);
$services->set(\ECSPrefix20220514\Symplify\SmartFileSystem\FileSystemFilter::class);
$services->set(\ECSPrefix20220514\Symplify\PackageBuilder\Console\Style\SymfonyStyleFactory::class);
$services->set(\ECSPrefix20220514\Symfony\Component\Console\Style\SymfonyStyle::class)->factory([\ECSPrefix20220514\Symfony\Component\DependencyInjection\Loader\Configurator\service(\ECSPrefix20220514\Symplify\PackageBuilder\Console\Style\SymfonyStyleFactory::class), 'create']);
$services->set(\ECSPrefix20220514\Symplify\PackageBuilder\Yaml\ParametersMerger::class);
$services->set(\Symplify\EasyCodingStandard\Console\Style\EasyCodingStandardStyle::class)->factory([\ECSPrefix20220514\Symfony\Component\DependencyInjection\Loader\Configurator\service(\Symplify\EasyCodingStandard\Console\Style\EasyCodingStandardStyleFactory::class), 'create']);
$services->set(\PhpCsFixer\WhitespacesFixerConfig::class)->factory([\ECSPrefix20220514\Symfony\Component\DependencyInjection\Loader\Configurator\service(\Symplify\EasyCodingStandard\FixerRunner\WhitespacesFixerConfigFactory::class), 'create']);
// code sniffer
$services->set(\PHP_CodeSniffer\Fixer::class);
// fixer
Expand Down
2 changes: 1 addition & 1 deletion config/set/clean-code.php
@@ -1,7 +1,7 @@
<?php

declare (strict_types=1);
namespace ECSPrefix20220513;
namespace ECSPrefix20220514;

use PhpCsFixer\Fixer\ArrayNotation\ArraySyntaxFixer;
use PhpCsFixer\Fixer\ClassNotation\ProtectedToPrivateFixer;
Expand Down
2 changes: 1 addition & 1 deletion config/set/common.php
@@ -1,7 +1,7 @@
<?php

declare (strict_types=1);
namespace ECSPrefix20220513;
namespace ECSPrefix20220514;

use Symplify\EasyCodingStandard\Config\ECSConfig;
return static function (\Symplify\EasyCodingStandard\Config\ECSConfig $ecsConfig) : void {
Expand Down
2 changes: 1 addition & 1 deletion config/set/common/array.php
@@ -1,7 +1,7 @@
<?php

declare (strict_types=1);
namespace ECSPrefix20220513;
namespace ECSPrefix20220514;

use PhpCsFixer\Fixer\ArrayNotation\ArraySyntaxFixer;
use PhpCsFixer\Fixer\ArrayNotation\NoTrailingCommaInSinglelineArrayFixer;
Expand Down
2 changes: 1 addition & 1 deletion config/set/common/comments.php
@@ -1,7 +1,7 @@
<?php

declare (strict_types=1);
namespace ECSPrefix20220513;
namespace ECSPrefix20220514;

use PHP_CodeSniffer\Standards\Generic\Sniffs\VersionControl\GitMergeConflictSniff;
use Symplify\EasyCodingStandard\Config\ECSConfig;
Expand Down
2 changes: 1 addition & 1 deletion config/set/common/control-structures.php
@@ -1,7 +1,7 @@
<?php

declare (strict_types=1);
namespace ECSPrefix20220513;
namespace ECSPrefix20220514;

use PHP_CodeSniffer\Standards\Generic\Sniffs\CodeAnalysis\AssignmentInConditionSniff;
use PhpCsFixer\Fixer\Casing\MagicConstantCasingFixer;
Expand Down
2 changes: 1 addition & 1 deletion config/set/common/docblock.php
@@ -1,7 +1,7 @@
<?php

declare (strict_types=1);
namespace ECSPrefix20220513;
namespace ECSPrefix20220514;

use PhpCsFixer\Fixer\Comment\NoTrailingWhitespaceInCommentFixer;
use PhpCsFixer\Fixer\Phpdoc\NoEmptyPhpdocFixer;
Expand Down
2 changes: 1 addition & 1 deletion config/set/common/namespaces.php
@@ -1,7 +1,7 @@
<?php

declare (strict_types=1);
namespace ECSPrefix20220513;
namespace ECSPrefix20220514;

use PhpCsFixer\Fixer\Import\NoUnusedImportsFixer;
use PhpCsFixer\Fixer\Import\OrderedImportsFixer;
Expand Down
2 changes: 1 addition & 1 deletion config/set/common/phpunit.php
@@ -1,7 +1,7 @@
<?php

declare (strict_types=1);
namespace ECSPrefix20220513;
namespace ECSPrefix20220514;

use PhpCsFixer\Fixer\PhpUnit\PhpUnitSetUpTearDownVisibilityFixer;
use PhpCsFixer\Fixer\PhpUnit\PhpUnitTestAnnotationFixer;
Expand Down
2 changes: 1 addition & 1 deletion config/set/common/spaces.php
@@ -1,7 +1,7 @@
<?php

declare (strict_types=1);
namespace ECSPrefix20220513;
namespace ECSPrefix20220514;

use PHP_CodeSniffer\Standards\Squiz\Sniffs\WhiteSpace\LanguageConstructSpacingSniff;
use PHP_CodeSniffer\Standards\Squiz\Sniffs\WhiteSpace\SuperfluousWhitespaceSniff;
Expand Down
2 changes: 1 addition & 1 deletion config/set/common/strict.php
@@ -1,7 +1,7 @@
<?php

declare (strict_types=1);
namespace ECSPrefix20220513;
namespace ECSPrefix20220514;

use PhpCsFixer\Fixer\LanguageConstruct\IsNullFixer;
use PhpCsFixer\Fixer\Strict\DeclareStrictTypesFixer;
Expand Down
2 changes: 1 addition & 1 deletion config/set/doctrine-annotations.php
@@ -1,7 +1,7 @@
<?php

declare (strict_types=1);
namespace ECSPrefix20220513;
namespace ECSPrefix20220514;

use PhpCsFixer\Fixer\DoctrineAnnotation\DoctrineAnnotationArrayAssignmentFixer;
use PhpCsFixer\Fixer\DoctrineAnnotation\DoctrineAnnotationIndentationFixer;
Expand Down
2 changes: 1 addition & 1 deletion config/set/php-cs-fixer-risky.php
@@ -1,7 +1,7 @@
<?php

declare (strict_types=1);
namespace ECSPrefix20220513;
namespace ECSPrefix20220514;

use PhpCsFixer\Fixer\Alias\EregToPregFixer;
use PhpCsFixer\Fixer\Alias\NoAliasFunctionsFixer;
Expand Down
2 changes: 1 addition & 1 deletion config/set/php-cs-fixer.php
@@ -1,7 +1,7 @@
<?php

declare (strict_types=1);
namespace ECSPrefix20220513;
namespace ECSPrefix20220514;

use PhpCsFixer\Fixer\Alias\NoMixedEchoPrintFixer;
use PhpCsFixer\Fixer\ArrayNotation\ArraySyntaxFixer;
Expand Down
2 changes: 1 addition & 1 deletion config/set/psr12.php
@@ -1,7 +1,7 @@
<?php

declare (strict_types=1);
namespace ECSPrefix20220513;
namespace ECSPrefix20220514;

use PhpCsFixer\Fixer\ArrayNotation\NoWhitespaceBeforeCommaInArrayFixer;
use PhpCsFixer\Fixer\ArrayNotation\WhitespaceAfterCommaInArrayFixer;
Expand Down
2 changes: 1 addition & 1 deletion config/set/symfony-risky.php
@@ -1,7 +1,7 @@
<?php

declare (strict_types=1);
namespace ECSPrefix20220513;
namespace ECSPrefix20220514;

use PhpCsFixer\Fixer\Alias\EregToPregFixer;
use PhpCsFixer\Fixer\Alias\NoAliasFunctionsFixer;
Expand Down
2 changes: 1 addition & 1 deletion config/set/symfony.php
@@ -1,7 +1,7 @@
<?php

declare (strict_types=1);
namespace ECSPrefix20220513;
namespace ECSPrefix20220514;

use PhpCsFixer\Fixer\Alias\NoMixedEchoPrintFixer;
use PhpCsFixer\Fixer\ArrayNotation\ArraySyntaxFixer;
Expand Down
2 changes: 1 addition & 1 deletion config/set/symplify.php
@@ -1,7 +1,7 @@
<?php

declare (strict_types=1);
namespace ECSPrefix20220513;
namespace ECSPrefix20220514;

use Symplify\EasyCodingStandard\Config\ECSConfig;
return static function (\Symplify\EasyCodingStandard\Config\ECSConfig $ecsConfig) : void {
Expand Down
6 changes: 3 additions & 3 deletions packages/Caching/CacheFactory.php
Expand Up @@ -5,8 +5,8 @@

use Symplify\EasyCodingStandard\Caching\ValueObject\Storage\FileCacheStorage;
use Symplify\EasyCodingStandard\ValueObject\Option;
use ECSPrefix20220513\Symplify\PackageBuilder\Parameter\ParameterProvider;
use ECSPrefix20220513\Symplify\SmartFileSystem\SmartFileSystem;
use ECSPrefix20220514\Symplify\PackageBuilder\Parameter\ParameterProvider;
use ECSPrefix20220514\Symplify\SmartFileSystem\SmartFileSystem;
final class CacheFactory
{
/**
Expand All @@ -17,7 +17,7 @@ final class CacheFactory
* @var \Symplify\SmartFileSystem\SmartFileSystem
*/
private $smartFileSystem;
public function __construct(\ECSPrefix20220513\Symplify\PackageBuilder\Parameter\ParameterProvider $parameterProvider, \ECSPrefix20220513\Symplify\SmartFileSystem\SmartFileSystem $smartFileSystem)
public function __construct(\ECSPrefix20220514\Symplify\PackageBuilder\Parameter\ParameterProvider $parameterProvider, \ECSPrefix20220514\Symplify\SmartFileSystem\SmartFileSystem $smartFileSystem)
{
$this->parameterProvider = $parameterProvider;
$this->smartFileSystem = $smartFileSystem;
Expand Down
16 changes: 8 additions & 8 deletions packages/Caching/ChangedFilesDetector.php
Expand Up @@ -3,8 +3,8 @@
declare (strict_types=1);
namespace Symplify\EasyCodingStandard\Caching;

use ECSPrefix20220513\Symplify\SmartFileSystem\SmartFileInfo;
use ECSPrefix20220513\Webmozart\Assert\Assert;
use ECSPrefix20220514\Symplify\SmartFileSystem\SmartFileInfo;
use ECSPrefix20220514\Webmozart\Assert\Assert;
/**
* @see \Symplify\EasyCodingStandard\Tests\ChangedFilesDetector\ChangedFilesDetector\ChangedFilesDetectorTest
*/
Expand Down Expand Up @@ -38,18 +38,18 @@ public function changeConfigurationFile(string $configurationFile) : void
{
$this->storeConfigurationDataHash($this->fileHashComputer->computeConfig($configurationFile));
}
public function addFileInfo(\ECSPrefix20220513\Symplify\SmartFileSystem\SmartFileInfo $smartFileInfo) : void
public function addFileInfo(\ECSPrefix20220514\Symplify\SmartFileSystem\SmartFileInfo $smartFileInfo) : void
{
$cacheKey = $this->fileInfoToKey($smartFileInfo);
$currentValue = $this->fileHashComputer->compute($smartFileInfo->getRealPath());
$this->cache->save($cacheKey, self::FILE_HASH, $currentValue);
}
public function invalidateFileInfo(\ECSPrefix20220513\Symplify\SmartFileSystem\SmartFileInfo $smartFileInfo) : void
public function invalidateFileInfo(\ECSPrefix20220514\Symplify\SmartFileSystem\SmartFileInfo $smartFileInfo) : void
{
$cacheKey = $this->fileInfoToKey($smartFileInfo);
$this->cache->clean($cacheKey);
}
public function hasFileInfoChanged(\ECSPrefix20220513\Symplify\SmartFileSystem\SmartFileInfo $smartFileInfo) : bool
public function hasFileInfoChanged(\ECSPrefix20220514\Symplify\SmartFileSystem\SmartFileInfo $smartFileInfo) : bool
{
$newFileHash = $this->fileHashComputer->compute($smartFileInfo->getRealPath());
$cacheKey = $this->fileInfoToKey($smartFileInfo);
Expand All @@ -72,8 +72,8 @@ public function setUsedConfigs(array $configFiles) : void
if ($configFiles === []) {
return;
}
\ECSPrefix20220513\Webmozart\Assert\Assert::allString($configFiles);
\ECSPrefix20220513\Webmozart\Assert\Assert::allFile($configFiles);
\ECSPrefix20220514\Webmozart\Assert\Assert::allString($configFiles);
\ECSPrefix20220514\Webmozart\Assert\Assert::allFile($configFiles);
// the first config is core to all → if it was changed, just invalidate it
$firstConfigFile = $configFiles[0];
$this->storeConfigurationDataHash($this->fileHashComputer->computeConfig($firstConfigFile));
Expand All @@ -83,7 +83,7 @@ private function storeConfigurationDataHash(string $configurationHash) : void
$this->invalidateCacheIfConfigurationChanged($configurationHash);
$this->cache->save(self::CONFIGURATION_HASH_KEY, self::FILE_HASH, $configurationHash);
}
private function fileInfoToKey(\ECSPrefix20220513\Symplify\SmartFileSystem\SmartFileInfo $smartFileInfo) : string
private function fileInfoToKey(\ECSPrefix20220514\Symplify\SmartFileSystem\SmartFileInfo $smartFileInfo) : string
{
return \sha1($smartFileInfo->getRelativeFilePathFromCwd());
}
Expand Down

0 comments on commit 0a5eccd

Please sign in to comment.