mirror of
https://github.com/rectorphp/rector.git
synced 2025-04-14 04:22:17 +02:00
coding style
This commit is contained in:
parent
db36e503c6
commit
163392bd9b
@ -1,12 +1,14 @@
|
||||
parameters:
|
||||
exclude_paths:
|
||||
- "/tests/"
|
||||
- "/Fixture/"
|
||||
- "/Fixtures/"
|
||||
- "/Source/"
|
||||
# autoload-buggy cases
|
||||
- "*.php.inc"
|
||||
# string might not exist for SplitStringClassConstantToClassConstFetchRector
|
||||
- "packages/Symfony/src/Rector/Console/ConsoleExceptionToErrorEventConstantRector.php"
|
||||
|
||||
- "tests/Rector/Argument/ArgumentRemoverRector/ArgumentRemoverRectorTest.php"
|
||||
- "tests/Rector/Argument/ArgumentDefaultValueReplacerRector/ArgumentDefaultValueReplacerRectorTest.php"
|
||||
|
||||
# so Rector code is still PHP 7.1 compatible
|
||||
php_version_features: '7.1'
|
||||
|
@ -112,7 +112,7 @@ abstract class AbstractRectorTestCase extends AbstractKernelTestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* @return mixed[]
|
||||
* @return array<string, array>
|
||||
*/
|
||||
protected function getRectorsWithConfiguration(): array
|
||||
{
|
||||
|
@ -35,7 +35,7 @@ final class BetterStandardPrinterTest extends AbstractKernelTestCase
|
||||
{
|
||||
yield ['Vendor\Name', "'Vendor\Name'"];
|
||||
yield ['Vendor\\', "'Vendor\\\\'"];
|
||||
yield ['Vendor\'Name', "'Vendor\'Name'"];
|
||||
yield ["Vendor'Name", "'Vendor\'Name'"];
|
||||
}
|
||||
|
||||
public function testYield(): void
|
||||
|
@ -15,12 +15,15 @@ namespace NettePostfixedToUniqueAutoload\Utils;
|
||||
*/
|
||||
class RegexpException extends \Exception
|
||||
{
|
||||
/**
|
||||
* @var mixed[]
|
||||
*/
|
||||
public const MESSAGES = [
|
||||
PREG_INTERNAL_ERROR => 'Internal error',
|
||||
PREG_BACKTRACK_LIMIT_ERROR => 'Backtrack limit was exhausted',
|
||||
PREG_RECURSION_LIMIT_ERROR => 'Recursion limit was exhausted',
|
||||
PREG_BAD_UTF8_ERROR => 'Malformed UTF-8 data',
|
||||
PREG_BAD_UTF8_OFFSET_ERROR => 'Offset didn\'t correspond to the begin of a valid UTF-8 code point',
|
||||
PREG_BAD_UTF8_OFFSET_ERROR => "Offset didn't correspond to the begin of a valid UTF-8 code point",
|
||||
6 => 'Failed due to limited JIT stack space', // PREG_JIT_STACKLIMIT_ERROR
|
||||
];
|
||||
}
|
||||
|
@ -2,6 +2,9 @@
|
||||
|
||||
namespace Rector\Tests\Rector\RectorOrder;
|
||||
|
||||
use Rector\PHPUnit\Rector\SpecificMethod\AssertFalseStrposToContainsRector;
|
||||
use Rector\PHPUnit\Rector\SpecificMethod\AssertComparisonToSpecificMethodRector;
|
||||
use Rector\PHPUnit\Rector\SpecificMethod\AssertSameBoolNullToSpecificMethodRector;
|
||||
use Rector\Testing\PHPUnit\AbstractRectorTestCase;
|
||||
|
||||
/**
|
||||
@ -21,9 +24,9 @@ final class RectorOrderTest extends AbstractRectorTestCase
|
||||
{
|
||||
// order matters
|
||||
return [
|
||||
\Rector\PHPUnit\Rector\SpecificMethod\AssertComparisonToSpecificMethodRector::class => [],
|
||||
\Rector\PHPUnit\Rector\SpecificMethod\AssertSameBoolNullToSpecificMethodRector::class => [],
|
||||
\Rector\PHPUnit\Rector\SpecificMethod\AssertFalseStrposToContainsRector::class => [],
|
||||
AssertComparisonToSpecificMethodRector::class => [],
|
||||
AssertSameBoolNullToSpecificMethodRector::class => [],
|
||||
AssertFalseStrposToContainsRector::class => [],
|
||||
];
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user