Valinor/tests/Fake/Definition/Repository/FakeClassDefinitionRepository.php
Romain Canon 7869cbd09c refactor: remove unnecessary ClassSignature
This abstraction layer was not useful, so it is removed to simplify the
API around `ClassDefinition`.

A new method `ClassDefinition::type()` is also added, giving access to
the `ClassType` instance when working with a class definition.
2022-01-25 18:32:28 +01:00

19 lines
498 B
PHP

<?php
declare(strict_types=1);
namespace CuyZ\Valinor\Tests\Fake\Definition\Repository;
use CuyZ\Valinor\Definition\ClassDefinition;
use CuyZ\Valinor\Definition\Repository\ClassDefinitionRepository;
use CuyZ\Valinor\Tests\Fake\Definition\FakeClassDefinition;
use CuyZ\Valinor\Type\Types\ClassType;
final class FakeClassDefinitionRepository implements ClassDefinitionRepository
{
public function for(ClassType $type): ClassDefinition
{
return FakeClassDefinition::new();
}
}