| 1 | <?php |
||
| 15 | abstract class BaseType implements TypeInterface |
||
| 16 | { |
||
| 17 | /** |
||
| 18 | * @var string |
||
| 19 | */ |
||
| 20 | private $name; |
||
| 21 | |||
| 22 | /** |
||
| 23 | * @var TypeInterface |
||
| 24 | */ |
||
| 25 | private $parent; |
||
| 26 | |||
| 27 | /** |
||
| 28 | * BaseType constructor. |
||
| 29 | * @param string $name |
||
| 30 | * @param TypeInterface $parent |
||
| 31 | */ |
||
| 32 | public function __construct(string $name, TypeInterface $parent) |
||
| 37 | |||
| 38 | /** |
||
| 39 | * @return string |
||
| 40 | */ |
||
| 41 | public function getName(): string |
||
| 45 | |||
| 46 | /** |
||
| 47 | * @param TypeInterface $type |
||
| 48 | * @return bool |
||
| 49 | */ |
||
| 50 | public function is(TypeInterface $type): bool |
||
| 54 | |||
| 55 | /** |
||
| 56 | * @param TypeInterface $type |
||
| 57 | * @return bool |
||
| 58 | */ |
||
| 59 | public function instanceOf(TypeInterface $type): bool |
||
| 63 | } |
||
| 64 |