mirror of
https://github.com/danog/Valinor.git
synced 2024-12-02 17:48:14 +01:00
22 lines
658 B
PHP
22 lines
658 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace CuyZ\Valinor\Tests\Fixture\Object\InterfaceWithDifferentNamespaces;
|
|
|
|
use CuyZ\Valinor\Tests\Fixture\Object\InterfaceWithDifferentNamespaces\A\ClassThatInheritsInterfaceA;
|
|
use CuyZ\Valinor\Tests\Fixture\Object\InterfaceWithDifferentNamespaces\A\OtherClassThatInheritsInterfaceA;
|
|
|
|
final class InterfaceAInferer
|
|
{
|
|
/**
|
|
* @return class-string<ClassThatInheritsInterfaceA|OtherClassThatInheritsInterfaceA>
|
|
*/
|
|
public static function infer(bool $classic): string
|
|
{
|
|
return $classic
|
|
? ClassThatInheritsInterfaceA::class
|
|
: OtherClassThatInheritsInterfaceA::class;
|
|
}
|
|
}
|