static fixes (#578)

This commit is contained in:
Tomas Votruba 2021-08-02 21:24:42 +02:00 committed by GitHub
parent d936944aed
commit 23bf1ca771
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 10 additions and 16 deletions

View File

@ -4,7 +4,7 @@ declare(strict_types=1);
namespace Rector\Caching;
use Rector\Caching\ValueObject\Storage\CacheStorageInterface;
use Rector\Caching\Contract\ValueObject\Storage\CacheStorageInterface;
final class Cache
{

View File

@ -2,10 +2,11 @@
declare(strict_types=1);
namespace Rector\Caching\ValueObject\Storage;
namespace Rector\Caching\Contract\ValueObject\Storage;
/**
* inspired by https://github.com/phpstan/phpstan-src/blob/560652088406d7461c2c4ad4897784e33f8ab312/src/Cache/CacheStorage.php
* @internal
*/
interface CacheStorageInterface
{

View File

@ -6,6 +6,7 @@ namespace Rector\Caching\ValueObject\Storage;
use Nette\Utils\Random;
use PHPStan\File\FileWriter;
use Rector\Caching\Contract\ValueObject\Storage\CacheStorageInterface;
use Rector\Caching\ValueObject\CacheFilePaths;
use Rector\Caching\ValueObject\CacheItem;
use Symplify\EasyCodingStandard\Caching\Exception\CachingException;

View File

@ -4,6 +4,7 @@ declare(strict_types=1);
namespace Rector\Caching\ValueObject\Storage;
use Rector\Caching\Contract\ValueObject\Storage\CacheStorageInterface;
use Rector\Caching\ValueObject\CacheItem;
/**

View File

@ -181,9 +181,6 @@ parameters:
paths:
- rules/Php80/Rector/If_/NullsafeOperatorRector.php
# covered in symplify main
- '#Method "(equal|match)(.*?)\(\)" returns bool type, so the name should start with is/has/was#'
-
message: '#Comparison operation "<" between 0 and 2 is always true#'
paths:
@ -387,13 +384,6 @@ parameters:
- '#Method Rector\\Core\\Tests\\DependencyInjection\\ConfigurableRectorImportConfigCallsMergeTest\:\:provideData\(\) return type has no value type specified in iterable type Iterator#'
# fixed in dev-main
-
message: '#Use dependency injection instead of dependency juggling#'
paths:
# better reflection static design
- packages/NodeTypeResolver/Reflection/BetterReflection/SourceLocatorProvider/DynamicSourceLocatorProvider.php
-
message: '#Use value object over return of values#'
paths:
@ -506,11 +496,12 @@ parameters:
- '#Method "decorateReturnWithSpecificType\(\)" returns bool type, so the name should start with is/has/was#'
- '#Method "resolveObjectType\(\)" returns bool type, so the name should start with is/has/was#'
# internal contract, not meant for re-use at rector consumer level
- '#Method "(equal|match)(.*?)\(\)" returns bool type, so the name should start with is/has/was#'
-
message: '#Interface must be located in "Contract" namespace#'
message: '#Use dependency injection instead of dependency juggling#'
paths:
- packages/Caching/ValueObject/Storage/CacheStorageInterface.php
- packages/NodeTypeResolver/Reflection/BetterReflection/SourceLocatorProvider
# resolve later
-

View File

@ -5,7 +5,7 @@ declare(strict_types=1);
namespace Rector\Core\Configuration;
use JetBrains\PhpStorm\Immutable;
use Rector\Caching\ValueObject\Storage\CacheStorageInterface;
use Rector\Caching\Contract\ValueObject\Storage\CacheStorageInterface;
use Rector\Caching\ValueObject\Storage\FileCacheStorage;
use Symplify\Skipper\ValueObject\Option as SkipperOption;