Skip to content

Commit d0fc068

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 deba1bb + 02008be commit d0fc068

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

Read/Splitter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ private static function createListBoundaries(\Iterator $tokens): \Iterator
7979
}
8080

8181
[$value, $position] = $token;
82-
$offset = $offset ?? $position;
82+
$offset ??= $position;
8383

8484
if (isset(self::NESTING_CHARS[$value])) {
8585
++$level;

Read/StreamReaderGenerator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ public function generate(Type $type, bool $decodeFromStream, array $options = []
7676
try {
7777
$this->fs->dumpFile($tmpFile, $php);
7878
$this->fs->rename($tmpFile, $path);
79-
$this->fs->chmod($path, 0666 & ~umask());
79+
$this->fs->chmod($path, 0o666 & ~umask());
8080
} catch (IOException $e) {
8181
throw new RuntimeException(\sprintf('Failed to write "%s" stream reader file.', $path), previous: $e);
8282
}

Write/StreamWriterGenerator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ public function generate(Type $type, array $options = []): string
7676
try {
7777
$this->fs->dumpFile($tmpFile, $php);
7878
$this->fs->rename($tmpFile, $path);
79-
$this->fs->chmod($path, 0666 & ~umask());
79+
$this->fs->chmod($path, 0o666 & ~umask());
8080
} catch (IOException $e) {
8181
throw new RuntimeException(\sprintf('Failed to write "%s" stream writer file.', $path), previous: $e);
8282
}

0 commit comments

Comments
 (0)