| Total Complexity | 5 |
| Total Lines | 29 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 14 | final class ShouldStringify implements Satisfiable |
||
| 15 | { |
||
| 16 | private $types; |
||
| 17 | |||
| 18 | private function __construct(string ...$types) |
||
| 19 | { |
||
| 20 | $this->types = $types; |
||
| 21 | } |
||
| 22 | |||
| 23 | /** |
||
| 24 | * Produces a constraint to stringify these classes. |
||
| 25 | * |
||
| 26 | * @param string ...$classes Fully qualified class or interface names. |
||
| 27 | * @return ShouldStringify The constraint. |
||
| 28 | */ |
||
| 29 | public static function these(string ...$classes): self |
||
| 30 | { |
||
| 31 | return new self(...$classes); |
||
| 32 | } |
||
| 33 | |||
| 34 | /** @inheritdoc */ |
||
| 35 | public function isSatisfiedBy($object): bool |
||
| 43 | } |
||
| 44 | } |
||
| 45 |