Skip to content

Commit

Permalink
chore: move interfaces without breaking
Browse files Browse the repository at this point in the history
  • Loading branch information
soyuka committed Apr 24, 2023
1 parent 3de661c commit 0fc5ad5
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 31 deletions.
9 changes: 2 additions & 7 deletions src/Api/FilterInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,6 @@

namespace ApiPlatform\Api;

interface_exists(\ApiPlatform\Metadata\FilterInterface::class);

/* @phpstan-ignore-next-line */
if (false) {
interface FilterInterface extends \ApiPlatform\Metadata\FilterInterface
{
}
interface FilterInterface extends \ApiPlatform\Metadata\FilterInterface
{
}
8 changes: 2 additions & 6 deletions src/Api/ResourceClassResolverInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,7 @@

namespace ApiPlatform\Api;

interface_exists(\ApiPlatform\Metadata\ResourceClassResolverInterface::class);

/* @phpstan-ignore-next-line */
if (false) {
interface ResourceClassResolverInterface extends \ApiPlatform\Metadata\ResourceClassResolverInterface
{
}
interface ResourceClassResolverInterface extends \ApiPlatform\Metadata\ResourceClassResolverInterface
{
}
4 changes: 0 additions & 4 deletions src/Metadata/FilterInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,3 @@ interface FilterInterface
*/
public function getDescription(string $resourceClass): array;
}

if (!interface_exists(\ApiPlatform\Api\FilterInterface::class)) {
class_alias(FilterInterface::class, \ApiPlatform\Api\FilterInterface::class);
}
4 changes: 0 additions & 4 deletions src/Metadata/Operation/PathSegmentNameGeneratorInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,3 @@ interface PathSegmentNameGeneratorInterface
*/
public function getSegmentName(string $name, bool $collection = true): string;
}

if (!interface_exists(\ApiPlatform\Operation\PathSegmentNameGeneratorInterface::class)) {
class_alias(PathSegmentNameGeneratorInterface::class, \ApiPlatform\Operation\PathSegmentNameGeneratorInterface::class);
}
4 changes: 0 additions & 4 deletions src/Metadata/ResourceClassResolverInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,3 @@ public function getResourceClass(mixed $value, string $resourceClass = null, boo
*/
public function isResourceClass(string $type): bool;
}

if (!interface_exists(\ApiPlatform\Api\ResourceClassResolverInterface::class)) {
class_alias(ResourceClassResolverInterface::class, \ApiPlatform\Api\ResourceClassResolverInterface::class);
}
8 changes: 2 additions & 6 deletions src/Operation/PathSegmentNameGeneratorInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,7 @@

namespace ApiPlatform\Operation;

interface_exists(\ApiPlatform\Metadata\Operation\PathSegmentNameGeneratorInterface::class);

/* @phpstan-ignore-next-line */
if (false) {
interface PathSegmentNameGeneratorInterface extends \ApiPlatform\Metadata\Operation\PathSegmentNameGeneratorInterface
{
}
interface PathSegmentNameGeneratorInterface extends \ApiPlatform\Metadata\Operation\PathSegmentNameGeneratorInterface
{
}

0 comments on commit 0fc5ad5

Please sign in to comment.