Skip to content

[ToolKit] Add missing Interface suffixes #2717

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/Toolkit/src/Asset/Component.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

use Symfony\UX\Toolkit\Assert;
use Symfony\UX\Toolkit\Dependency\ComponentDependency;
use Symfony\UX\Toolkit\Dependency\Dependency;
use Symfony\UX\Toolkit\Dependency\DependencyInterface;
use Symfony\UX\Toolkit\Dependency\PhpPackageDependency;
use Symfony\UX\Toolkit\Dependency\StimulusControllerDependency;
use Symfony\UX\Toolkit\File\Doc;
Expand Down Expand Up @@ -43,7 +43,7 @@ public function __construct(
}
}

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

/**
* @return list<Dependency>
* @return list<DependencyInterface>
*/
public function getDependencies(): array
{
Expand Down
2 changes: 1 addition & 1 deletion src/Toolkit/src/Dependency/ComponentDependency.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
*
* @author Hugo Alliaume <[email protected]>
*/
final class ComponentDependency implements Dependency
final class ComponentDependency implements DependencyInterface
{
/**
* @param non-empty-string $name The name of the component, e.g. "Table" or "Table:Body"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@
*
* @author Hugo Alliaume <[email protected]>
*/
interface Dependency extends \Stringable
interface DependencyInterface extends \Stringable
{
}
2 changes: 1 addition & 1 deletion src/Toolkit/src/Dependency/PhpPackageDependency.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
*
* @author Hugo Alliaume <[email protected]>
*/
final class PhpPackageDependency implements Dependency
final class PhpPackageDependency implements DependencyInterface
{
/**
* @param non-empty-string $name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
*
* @author Hugo Alliaume <[email protected]>
*/
final class StimulusControllerDependency implements Dependency
final class StimulusControllerDependency implements DependencyInterface
{
/**
* @param non-empty-string $name
Expand Down
2 changes: 1 addition & 1 deletion src/Toolkit/src/Registry/GitHubRegistry.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
* @author Jean-François Lépine
* @author Hugo Alliaume <[email protected]>
*/
final class GitHubRegistry implements Registry
final class GitHubRegistry implements RegistryInterface
{
public function __construct(
private readonly KitFactory $kitFactory,
Expand Down
2 changes: 1 addition & 1 deletion src/Toolkit/src/Registry/LocalRegistry.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
* @author Jean-François Lépine
* @author Hugo Alliaume <[email protected]>
*/
final class LocalRegistry implements Registry
final class LocalRegistry implements RegistryInterface
{
private static string $kitsDir = __DIR__.\DIRECTORY_SEPARATOR.'..'.\DIRECTORY_SEPARATOR.'..'.\DIRECTORY_SEPARATOR.'kits';

Expand Down
2 changes: 1 addition & 1 deletion src/Toolkit/src/Registry/RegistryFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public function __construct(
/**
* @throws \InvalidArgumentException
*/
public function getForKit(string $kit): Registry
public function getForKit(string $kit): RegistryInterface
{
$type = match (true) {
GitHubRegistry::supports($kit) => Type::GitHub,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* @author Jean-François Lépine
* @author Hugo Alliaume <[email protected]>
*/
interface Registry
interface RegistryInterface
{
public static function supports(string $kitName): bool;

Expand Down
Loading