Skip to content

Commit 6cdbf05

Browse files
Fix php-cs-fixer errors
1 parent d3f0684 commit 6cdbf05

File tree

2 files changed

+20
-16
lines changed

2 files changed

+20
-16
lines changed

src/DependencyInjection/SymfonycastsSassExtension.php

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,6 @@
1717
use Symfony\Component\DependencyInjection\Extension\Extension;
1818
use Symfony\Component\DependencyInjection\Loader;
1919

20-
use function basename;
21-
use function in_array;
22-
2320
class SymfonycastsSassExtension extends Extension implements ConfigurationInterface
2421
{
2522
public function load(array $configs, ContainerBuilder $container): void
@@ -64,17 +61,17 @@ public function getConfigTreeBuilder(): TreeBuilder
6461
->end()
6562
->validate()
6663
->ifTrue(static function (array $paths): bool {
67-
if (count($paths) === 1) {
64+
if (1 === \count($paths)) {
6865
return false;
6966
}
7067

7168
$filenames = [];
7269
foreach ($paths as $path) {
73-
$filename = basename($path, '.scss');
70+
$filename = \basename($path, '.scss');
7471
$filenames[$filename] = $filename;
7572
}
7673

77-
return count($filenames) !== count($paths);
74+
return \count($filenames) !== \count($paths);
7875
})
7976
->thenInvalid('The root sass-paths need to end with unique filenames.')
8077
->end()

tests/ConfigurationTest.php

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22

33
declare(strict_types=1);
44

5+
/*
6+
* This file is part of the SymfonyCasts SassBundle package.
7+
* Copyright (c) SymfonyCasts <https://symfonycasts.com/>
8+
* For the full copyright and license information, please view the LICENSE
9+
* file that was distributed with this source code.
10+
*/
11+
512
namespace Symfonycasts\SassBundle\Tests;
613

714
use Matthias\SymfonyConfigTest\PhpUnit\ConfigurationTestCaseTrait;
@@ -22,9 +29,9 @@ public function testSingleSassRootPath(): void
2229
$this->assertConfigurationIsValid([
2330
'symfonycasts_sass' => [
2431
'root_sass' => [
25-
'%kernel.project_dir%/assets/scss/app.scss'
26-
]
27-
]
32+
'%kernel.project_dir%/assets/scss/app.scss',
33+
],
34+
],
2835
]);
2936
}
3037

@@ -34,9 +41,9 @@ public function testMultipleSassRootPaths(): void
3441
'symfonycasts_sass' => [
3542
'root_sass' => [
3643
'%kernel.project_dir%/assets/scss/app.scss',
37-
'%kernel.project_dir%/assets/admin/scss/admin.scss'
38-
]
39-
]
44+
'%kernel.project_dir%/assets/admin/scss/admin.scss',
45+
],
46+
],
4047
]);
4148
}
4249

@@ -46,10 +53,10 @@ public function testMultipleSassRootPathsWithSameFilename(): void
4653
'symfonycasts_sass' => [
4754
'root_sass' => [
4855
'%kernel.project_dir%/assets/scss/app.scss',
49-
'%kernel.project_dir%/assets/admin/scss/app.scss'
50-
]
51-
]
56+
'%kernel.project_dir%/assets/admin/scss/app.scss',
57+
],
58+
],
5259
],
53-
'Invalid configuration for path "symfonycasts_sass.root_sass": The root sass-paths need to end with unique filenames.');
60+
'Invalid configuration for path "symfonycasts_sass.root_sass": The root sass-paths need to end with unique filenames.');
5461
}
5562
}

0 commit comments

Comments
 (0)