coding style

This commit is contained in:
Tomas Votruba 2019-04-29 06:09:00 +02:00
parent db36e503c6
commit 163392bd9b
5 changed files with 16 additions and 8 deletions

View File

@ -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'

View File

@ -112,7 +112,7 @@ abstract class AbstractRectorTestCase extends AbstractKernelTestCase
}
/**
* @return mixed[]
* @return array<string, array>
*/
protected function getRectorsWithConfiguration(): array
{

View File

@ -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

View File

@ -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
];
}

View File

@ -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 => [],
];
}
}