Merge pull request #5044 from samsonasik/apply-rector-fix-class-case

[Rector] Apply Rector: FixClassCaseSensitivityNameRector
This commit is contained in:
Abdul Malik Ikhsan 2021-08-31 18:37:57 +07:00 committed by GitHub
commit 0869c0d02d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 10 deletions

View File

@ -20,6 +20,7 @@ use Rector\CodeQuality\Rector\If_\CombineIfRector;
use Rector\CodeQuality\Rector\If_\ShortenElseIfRector;
use Rector\CodeQuality\Rector\If_\SimplifyIfElseToTernaryRector;
use Rector\CodeQuality\Rector\If_\SimplifyIfReturnBoolRector;
use Rector\CodeQuality\Rector\Name\FixClassCaseSensitivityNameRector;
use Rector\CodeQuality\Rector\Return_\SimplifyUselessVariableRector;
use Rector\CodeQuality\Rector\Ternary\UnnecessaryTernaryExpressionRector;
use Rector\CodingStyle\Rector\ClassMethod\FuncGetArgsToVariadicParamRector;
@ -135,4 +136,5 @@ return static function (ContainerConfigurator $containerConfigurator): void {
$services->set(RemoveExtraParametersRector::class);
$services->set(FuncGetArgsToVariadicParamRector::class);
$services->set(MakeInheritedMethodVisibilitySameAsParentRector::class);
$services->set(FixClassCaseSensitivityNameRector::class);
};

View File

@ -62,10 +62,10 @@ final class PredisHandlerTest extends CIUnitTestCase
public function testDestruct()
{
$this->PredisHandler = new PRedisHandler($this->config);
$this->PredisHandler = new PredisHandler($this->config);
$this->PredisHandler->initialize();
$this->assertInstanceOf(PRedisHandler::class, $this->PredisHandler);
$this->assertInstanceOf(PredisHandler::class, $this->PredisHandler);
}
/**

View File

@ -123,7 +123,7 @@ final class DotEnvTest extends CIUnitTestCase
public function testQuotedDotenvLoadsEnvironmentVars()
{
$dotenv = new Dotenv($this->fixturesFolder, 'quoted.env');
$dotenv = new DotEnv($this->fixturesFolder, 'quoted.env');
$dotenv->load();
$this->assertSame('bar', getenv('QFOO'));
$this->assertSame('baz', getenv('QBAR'));
@ -138,13 +138,13 @@ final class DotEnvTest extends CIUnitTestCase
$this->expectException('InvalidArgumentException');
$this->expectExceptionMessage('.env values containing spaces must be surrounded by quotes.');
$dotenv = new Dotenv($this->fixturesFolder, 'spaced-wrong.env');
$dotenv = new DotEnv($this->fixturesFolder, 'spaced-wrong.env');
$dotenv->load();
}
public function testLoadsServerGlobals()
{
$dotenv = new Dotenv($this->fixturesFolder, '.env');
$dotenv = new DotEnv($this->fixturesFolder, '.env');
$dotenv->load();
$this->assertSame('bar', $_SERVER['FOO']);
@ -155,7 +155,7 @@ final class DotEnvTest extends CIUnitTestCase
public function testNamespacedVariables()
{
$dotenv = new Dotenv($this->fixturesFolder, '.env');
$dotenv = new DotEnv($this->fixturesFolder, '.env');
$dotenv->load();
$this->assertSame('complex', $_SERVER['SimpleConfig.simple.name']);
@ -164,7 +164,7 @@ final class DotEnvTest extends CIUnitTestCase
public function testLoadsGetServerVar()
{
$_SERVER['SER_VAR'] = 'TT';
$dotenv = new Dotenv($this->fixturesFolder, 'nested.env');
$dotenv = new DotEnv($this->fixturesFolder, 'nested.env');
$dotenv->load();
$this->assertSame('TT', $_ENV['NVAR7']);
@ -172,7 +172,7 @@ final class DotEnvTest extends CIUnitTestCase
public function testLoadsEnvGlobals()
{
$dotenv = new Dotenv($this->fixturesFolder);
$dotenv = new DotEnv($this->fixturesFolder);
$dotenv->load();
$this->assertSame('bar', $_ENV['FOO']);
$this->assertSame('baz', $_ENV['BAR']);
@ -182,7 +182,7 @@ final class DotEnvTest extends CIUnitTestCase
public function testNestedEnvironmentVars()
{
$dotenv = new Dotenv($this->fixturesFolder, 'nested.env');
$dotenv = new DotEnv($this->fixturesFolder, 'nested.env');
$dotenv->load();
$this->assertSame('{$NVAR1} {$NVAR2}', $_ENV['NVAR3']); // not resolved
$this->assertSame('Hello World!', $_ENV['NVAR4']);
@ -192,7 +192,7 @@ final class DotEnvTest extends CIUnitTestCase
public function testDotenvAllowsSpecialCharacters()
{
$dotenv = new Dotenv($this->fixturesFolder, 'specialchars.env');
$dotenv = new DotEnv($this->fixturesFolder, 'specialchars.env');
$dotenv->load();
$this->assertSame('$a6^C7k%zs+e^.jvjXk', getenv('SPVAR1'));
$this->assertSame('?BUty3koaV3%GA*hMAwH}B', getenv('SPVAR2'));