Skip to content

Commit c008adc

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 d999431 + 9a28218 commit c008adc

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Dumper/FileDumper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public function dump(MessageCatalogue $messages, array $options = []): void
4949
$fullpath = $options['path'].'/'.$this->getRelativePath($domain, $messages->getLocale());
5050
if (!file_exists($fullpath)) {
5151
$directory = \dirname($fullpath);
52-
if (!file_exists($directory) && !@mkdir($directory, 0777, true)) {
52+
if (!file_exists($directory) && !@mkdir($directory, 0o777, true)) {
5353
throw new RuntimeException(\sprintf('Unable to create directory "%s".', $directory));
5454
}
5555
}

Writer/TranslationWriter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public function write(MessageCatalogue $catalogue, string $format, array $option
6161
// get the right dumper
6262
$dumper = $this->dumpers[$format];
6363

64-
if (isset($options['path']) && !is_dir($options['path']) && !@mkdir($options['path'], 0777, true) && !is_dir($options['path'])) {
64+
if (isset($options['path']) && !is_dir($options['path']) && !@mkdir($options['path'], 0o777, true) && !is_dir($options['path'])) {
6565
throw new RuntimeException(\sprintf('Translation Writer was not able to create directory "%s".', $options['path']));
6666
}
6767

0 commit comments

Comments
 (0)