Skip to content

Commit 7f934c4

Browse files
committed
minor #2717 [ToolKit] Add missing Interface suffixes (smnandre)
This PR was merged into the 2.x branch. Discussion ---------- [ToolKit] Add missing Interface suffixes Fix #2539 Commits ------- 69463cd [ToolKit] Add missing Interface suffixes
2 parents 6a42945 + 69463cd commit 7f934c4

9 files changed

+11
-11
lines changed

src/Toolkit/src/Asset/Component.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
use Symfony\UX\Toolkit\Assert;
1515
use Symfony\UX\Toolkit\Dependency\ComponentDependency;
16-
use Symfony\UX\Toolkit\Dependency\Dependency;
16+
use Symfony\UX\Toolkit\Dependency\DependencyInterface;
1717
use Symfony\UX\Toolkit\Dependency\PhpPackageDependency;
1818
use Symfony\UX\Toolkit\Dependency\StimulusControllerDependency;
1919
use Symfony\UX\Toolkit\File\Doc;
@@ -43,7 +43,7 @@ public function __construct(
4343
}
4444
}
4545

46-
public function addDependency(Dependency $dependency): void
46+
public function addDependency(DependencyInterface $dependency): void
4747
{
4848
foreach ($this->dependencies as $i => $existingDependency) {
4949
if ($existingDependency instanceof PhpPackageDependency && $existingDependency->name === $dependency->name) {
@@ -69,7 +69,7 @@ public function addDependency(Dependency $dependency): void
6969
}
7070

7171
/**
72-
* @return list<Dependency>
72+
* @return list<DependencyInterface>
7373
*/
7474
public function getDependencies(): array
7575
{

src/Toolkit/src/Dependency/ComponentDependency.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
*
2121
* @author Hugo Alliaume <[email protected]>
2222
*/
23-
final class ComponentDependency implements Dependency
23+
final class ComponentDependency implements DependencyInterface
2424
{
2525
/**
2626
* @param non-empty-string $name The name of the component, e.g. "Table" or "Table:Body"

src/Toolkit/src/Dependency/Dependency.php renamed to src/Toolkit/src/Dependency/DependencyInterface.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@
1818
*
1919
* @author Hugo Alliaume <[email protected]>
2020
*/
21-
interface Dependency extends \Stringable
21+
interface DependencyInterface extends \Stringable
2222
{
2323
}

src/Toolkit/src/Dependency/PhpPackageDependency.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
*
2121
* @author Hugo Alliaume <[email protected]>
2222
*/
23-
final class PhpPackageDependency implements Dependency
23+
final class PhpPackageDependency implements DependencyInterface
2424
{
2525
/**
2626
* @param non-empty-string $name

src/Toolkit/src/Dependency/StimulusControllerDependency.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
*
2121
* @author Hugo Alliaume <[email protected]>
2222
*/
23-
final class StimulusControllerDependency implements Dependency
23+
final class StimulusControllerDependency implements DependencyInterface
2424
{
2525
/**
2626
* @param non-empty-string $name

src/Toolkit/src/Registry/GitHubRegistry.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
* @author Jean-François Lépine
2525
* @author Hugo Alliaume <[email protected]>
2626
*/
27-
final class GitHubRegistry implements Registry
27+
final class GitHubRegistry implements RegistryInterface
2828
{
2929
public function __construct(
3030
private readonly KitFactory $kitFactory,

src/Toolkit/src/Registry/LocalRegistry.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
* @author Jean-François Lépine
2424
* @author Hugo Alliaume <[email protected]>
2525
*/
26-
final class LocalRegistry implements Registry
26+
final class LocalRegistry implements RegistryInterface
2727
{
2828
private static string $kitsDir = __DIR__.\DIRECTORY_SEPARATOR.'..'.\DIRECTORY_SEPARATOR.'..'.\DIRECTORY_SEPARATOR.'kits';
2929

src/Toolkit/src/Registry/RegistryFactory.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public function __construct(
2929
/**
3030
* @throws \InvalidArgumentException
3131
*/
32-
public function getForKit(string $kit): Registry
32+
public function getForKit(string $kit): RegistryInterface
3333
{
3434
$type = match (true) {
3535
GitHubRegistry::supports($kit) => Type::GitHub,

src/Toolkit/src/Registry/Registry.php renamed to src/Toolkit/src/Registry/RegistryInterface.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
* @author Jean-François Lépine
2020
* @author Hugo Alliaume <[email protected]>
2121
*/
22-
interface Registry
22+
interface RegistryInterface
2323
{
2424
public static function supports(string $kitName): bool;
2525

0 commit comments

Comments
 (0)