mirror of https://github.com/rectorphp/rector.git
static fixes (#578)
This commit is contained in:
parent
d936944aed
commit
23bf1ca771
|
@ -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
|
||||
{
|
||||
|
|
|
@ -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
|
||||
{
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
||||
/**
|
||||
|
|
17
phpstan.neon
17
phpstan.neon
|
@ -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
|
||||
-
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue