Skip to content

Commit 827fed0

Browse files
minor #61371 chore: PHP CS Fixer - restore PHP / PHPUnit rulesets (keradus)
This PR was squashed before being merged into the 7.4 branch. Discussion ---------- chore: PHP CS Fixer - restore PHP / PHPUnit rulesets | Q | A | ------------- | --- | Branch? | 7.4 | Bug fix? | no | New feature? | no <!-- please update src/**/CHANGELOG.md files --> | Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files --> | Issues | Fix CS <!-- prefix each issue number with "Fix #", no need to create an issue if none exists, explain below instead --> | License | MIT relates to symfony/symfony@5d4e211#r163638626 , showing: - possible improvements to codebase that those ruleset can still offer (especially when targetting newest possible target version) - and also preventing old way to still be in use, if someone forget to use new syntax/methods with love by [PHP Coding Standards Fixer](https://cs.symfony.com/) Commits ------- 92940de5e52 chore: PHP CS Fixer - restore PHP / PHPUnit rulesets
2 parents d5c46dc + 8965ae6 commit 827fed0

File tree

5 files changed

+9
-9
lines changed

5 files changed

+9
-9
lines changed

Command/AssetsInstallCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ private function symlink(string $originDir, string $targetDir, bool $relative =
237237
*/
238238
private function hardCopy(string $originDir, string $targetDir): string
239239
{
240-
$this->filesystem->mkdir($targetDir, 0777);
240+
$this->filesystem->mkdir($targetDir, 0o777);
241241
// We use a custom iterator to ignore VCS files
242242
$this->filesystem->mirror($originDir, $targetDir, Finder::create()->ignoreDotFiles(false)->in($originDir));
243243

DependencyInjection/Compiler/ContainerBuilderDebugDumpPass.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ public function process(ContainerBuilder $container): void
5959

6060
$fs = new Filesystem();
6161
$fs->dumpFile($file, serialize($dump));
62-
$fs->chmod($file, 0666, umask());
62+
$fs->chmod($file, 0o666, umask());
6363
} catch (\Throwable $e) {
6464
$container->getCompiler()->log($this, $e->getMessage());
6565
// ignore serialization and file-system errors

Secrets/SodiumVault.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ private function export(string $filename, string $data): void
228228

229229
private function createSecretsDir(): void
230230
{
231-
if ($this->secretsDir && !is_dir($this->secretsDir) && !@mkdir($this->secretsDir, 0777, true) && !is_dir($this->secretsDir)) {
231+
if ($this->secretsDir && !is_dir($this->secretsDir) && !@mkdir($this->secretsDir, 0o777, true) && !is_dir($this->secretsDir)) {
232232
throw new \RuntimeException(\sprintf('Unable to create the secrets directory (%s).', $this->secretsDir));
233233
}
234234

Tests/Command/AboutCommand/AboutCommandTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public function testAboutWithReadableFiles()
3434
$this->fs->mkdir($kernel->getProjectDir());
3535

3636
$this->fs->dumpFile($kernel->getCacheDir().'/readable_file', 'The file content.');
37-
$this->fs->chmod($kernel->getCacheDir().'/readable_file', 0777);
37+
$this->fs->chmod($kernel->getCacheDir().'/readable_file', 0o777);
3838

3939
$tester = $this->createCommandTester($kernel);
4040
$ret = $tester->execute([]);
@@ -43,7 +43,7 @@ public function testAboutWithReadableFiles()
4343
$this->assertStringContainsString('Cache directory', $tester->getDisplay());
4444
$this->assertStringContainsString('Log directory', $tester->getDisplay());
4545

46-
$this->fs->chmod($kernel->getCacheDir().'/readable_file', 0777);
46+
$this->fs->chmod($kernel->getCacheDir().'/readable_file', 0o777);
4747

4848
try {
4949
$this->fs->remove($kernel->getProjectDir());
@@ -62,7 +62,7 @@ public function testAboutWithUnreadableFiles()
6262
}
6363

6464
$this->fs->dumpFile($kernel->getCacheDir().'/unreadable_file', 'The file content.');
65-
$this->fs->chmod($kernel->getCacheDir().'/unreadable_file', 0222);
65+
$this->fs->chmod($kernel->getCacheDir().'/unreadable_file', 0o222);
6666

6767
$tester = $this->createCommandTester($kernel);
6868
$ret = $tester->execute([]);
@@ -71,7 +71,7 @@ public function testAboutWithUnreadableFiles()
7171
$this->assertStringContainsString('Cache directory', $tester->getDisplay());
7272
$this->assertStringContainsString('Log directory', $tester->getDisplay());
7373

74-
$this->fs->chmod($kernel->getCacheDir().'/unreadable_file', 0777);
74+
$this->fs->chmod($kernel->getCacheDir().'/unreadable_file', 0o777);
7575

7676
try {
7777
$this->fs->remove($kernel->getProjectDir());

Tests/Command/TranslationExtractCommandTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,12 +155,12 @@ public function testFilterDuplicateTransPaths()
155155

156156
if (preg_match('/\.[a-z]+$/', $transPath)) {
157157
if (!realpath(\dirname($transPath))) {
158-
mkdir(\dirname($transPath), 0777, true);
158+
mkdir(\dirname($transPath), 0o777, true);
159159
}
160160

161161
touch($transPath);
162162
} else {
163-
mkdir($transPath, 0777, true);
163+
mkdir($transPath, 0o777, true);
164164
}
165165
}
166166

0 commit comments

Comments
 (0)