Skip to content

Commit 5439d4c

Browse files
committed
Rename class and move it to sub-namespace
1 parent 45cc044 commit 5439d4c

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/Property/DependencyCalculator.php renamed to src/Property/Selector/SpecificityCalculator.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
declare(strict_types=1);
44

5-
namespace Sabberworm\CSS\Property;
5+
namespace Sabberworm\CSS\Property\Selector;
66

77
/**
88
* Utility class to calculate the specificity of a CSS selector.
@@ -11,7 +11,7 @@
1111
*
1212
* @internal
1313
*/
14-
final class DependencyCalculator
14+
final class SpecificityCalculator
1515
{
1616
/**
1717
* regexp for specificity calculations

tests/Unit/Property/DependencyCalculatorTest.php renamed to tests/Unit/Property/Selector/SpecificityCalculatorTest.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22

33
declare(strict_types=1);
44

5-
namespace Sabberworm\CSS\Tests\Unit\Property;
5+
namespace Sabberworm\CSS\Tests\Unit\Property\Selector;
66

77
use PHPUnit\Framework\TestCase;
8-
use Sabberworm\CSS\Property\DependencyCalculator;
8+
use Sabberworm\CSS\Property\Selector\SpecificityCalculator;
99

1010
/**
11-
* @covers \Sabberworm\CSS\Property\DependencyCalculator
11+
* @covers \Sabberworm\CSS\Property\Selector\SpecificityCalculator
1212
*/
13-
final class DependencyCalculatorTest extends TestCase
13+
final class SpecificityCalculatorTest extends TestCase
1414
{
1515
/**
1616
* @return array<string, array{0: non-empty-string, 1: int<0, max>}>
@@ -40,6 +40,6 @@ public function calculateSpecificityReturnsSpecificityForProvidedSelector(
4040
string $selector,
4141
int $expectedSpecificity
4242
): void {
43-
self::assertSame($expectedSpecificity, DependencyCalculator::calculateSpecificity($selector));
43+
self::assertSame($expectedSpecificity, SpecificityCalculator::calculateSpecificity($selector));
4444
}
4545
}

0 commit comments

Comments
 (0)