Skip to content

Commit 942acd3

Browse files
committed
Fix code style
1 parent 84eb638 commit 942acd3

File tree

6 files changed

+11
-10
lines changed

6 files changed

+11
-10
lines changed

.php-cs-fixer.dist.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
return (new PhpCsFixer\Config())
99
->setRiskyAllowed(true)
10+
->setParallelConfig(PhpCsFixer\Runner\Parallel\ParallelConfigFactory::detect())
1011
->setRules([
1112
'@Symfony' => true,
1213
'@Symfony:risky' => true,

composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@
3131
"twig/twig": "^3.0"
3232
},
3333
"require-dev": {
34-
"friendsofphp/php-cs-fixer": "^3.49.0",
35-
"phpstan/phpstan": "^1.10.57",
36-
"phpstan/phpstan-deprecation-rules": "^1.1.4",
34+
"friendsofphp/php-cs-fixer": "^3.64.0",
35+
"phpstan/phpstan": "^1.12.5",
36+
"phpstan/phpstan-deprecation-rules": "^1.2.1",
3737
"phpunit/phpunit": "^9.6.16",
3838
"symfony/css-selector": "^6.4 || ^7.0",
3939
"symfony/dom-crawler": "^6.4 || ^7.0",

src/Command/InstallCommand.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ private function downloadZip(OutputInterface $output, string $tag): string
4040

4141
$path = (string) tempnam(sys_get_temp_dir(), 'froala-' . $tag . '.zip');
4242
if (!@file_put_contents($path, $zip)) {
43-
throw new \RuntimeException(sprintf('Unable to write Froala ZIP archive to "%s".', $path));
43+
throw new \RuntimeException(\sprintf('Unable to write Froala ZIP archive to "%s".', $path));
4444
}
4545

4646
$output->writeln(' Ok.');
@@ -56,7 +56,7 @@ private function extractZip(OutputInterface $output, string $zipPath, string $ou
5656
$fileSystem->exists($outputPath);
5757

5858
if ($fileSystem->exists($outputPath) && !$clear) {
59-
$output->writeln(sprintf("\nThe directory \"%s\" already exists and the clear option is not enabled, aborting.", $outputPath));
59+
$output->writeln(\sprintf("\nThe directory \"%s\" already exists and the clear option is not enabled, aborting.", $outputPath));
6060
} else {
6161
if (is_dir($outputPath)) {
6262
$fileSystem->remove($outputPath);
@@ -65,11 +65,11 @@ private function extractZip(OutputInterface $output, string $zipPath, string $ou
6565

6666
$zip = new \ZipArchive();
6767
if (true !== $zip->open($zipPath)) {
68-
throw new \RuntimeException(sprintf('Cannot open zip file "%s".', $zipPath));
68+
throw new \RuntimeException(\sprintf('Cannot open zip file "%s".', $zipPath));
6969
}
7070
for ($i = 0; $i < $zip->numFiles; ++$i) {
7171
$filename = $zip->getNameIndex($i);
72-
$zipFile = sprintf('zip://%s#%s', $zipPath, $filename);
72+
$zipFile = \sprintf('zip://%s#%s', $zipPath, $filename);
7373
// Remove the first directory (eg. "wysiwyg-editor-master") from the file path
7474
$explodedPath = explode('/', $filename, 2);
7575
$realFilePath = $explodedPath[1];

src/Form/Type/FroalaEditorType.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public function buildView(FormView $view, FormInterface $form, array $options):
5858
$options['froala_' . $profileKey] = $profileOption;
5959
}
6060
} else {
61-
throw new \InvalidArgumentException(sprintf('Unrecognized profile "%s". Available profiles are "%s".', $profile, implode('"", "', array_keys($profiles))));
61+
throw new \InvalidArgumentException(\sprintf('Unrecognized profile "%s". Available profiles are "%s".', $profile, implode('"", "', array_keys($profiles))));
6262
}
6363
}
6464

src/Service/MediaManager.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public function uploadVideo(FileBag $fileBag, string $rootDir, string $publicDir
6565
*/
6666
private function obtainFolder(string $rootDir, string $publicDir, string $folder): string
6767
{
68-
return sprintf('%s%s/%s', $rootDir, $publicDir, $folder);
68+
return \sprintf('%s%s/%s', $rootDir, $publicDir, $folder);
6969
}
7070

7171
private function obtainPath(string $basePath, string $path): string

tests/Utility/UConfigurationTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public function testAllOptionsAreRegistered(): void
3131

3232
self::assertSame([], $missingOptions);
3333
} catch (ClientException $e) {
34-
$this->markTestSkipped(sprintf('Unable to retrieve options docs page: %s', $e->getMessage()));
34+
$this->markTestSkipped(\sprintf('Unable to retrieve options docs page: %s', $e->getMessage()));
3535
}
3636
}
3737
}

0 commit comments

Comments
 (0)