Skip to content

[Rector] Apply Rector: FixClassCaseSensitivityNameRector #5044

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions rector.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
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;
Expand Down Expand Up @@ -135,4 +136,5 @@
$services->set(RemoveExtraParametersRector::class);
$services->set(FuncGetArgsToVariadicParamRector::class);
$services->set(MakeInheritedMethodVisibilitySameAsParentRector::class);
$services->set(FixClassCaseSensitivityNameRector::class);
};
4 changes: 2 additions & 2 deletions tests/system/Cache/Handlers/PredisHandlerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,10 @@ public function testNew()

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);
}

/**
Expand Down
16 changes: 8 additions & 8 deletions tests/system/Config/DotEnvTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ public function testLoadsUnreadableFile()

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'));
Expand All @@ -138,13 +138,13 @@ public function testSpacedValuesWithoutQuotesThrowsException()
$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']);
Expand All @@ -155,7 +155,7 @@ public function testLoadsServerGlobals()

public function testNamespacedVariables()
{
$dotenv = new Dotenv($this->fixturesFolder, '.env');
$dotenv = new DotEnv($this->fixturesFolder, '.env');
$dotenv->load();

$this->assertSame('complex', $_SERVER['SimpleConfig.simple.name']);
Expand All @@ -164,15 +164,15 @@ public function testNamespacedVariables()
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']);
}

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']);
Expand All @@ -182,7 +182,7 @@ public function testLoadsEnvGlobals()

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']);
Expand All @@ -192,7 +192,7 @@ public function testNestedEnvironmentVars()

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'));
Expand Down