| Total Complexity | 4 |
| Total Lines | 32 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 17 | final class HaveTheDiscriminatorValue implements Specifies |
||
| 18 | { |
||
| 19 | use Specifying; |
||
| 20 | |||
| 21 | /** @var string */ |
||
| 22 | private $key; |
||
| 23 | /** @var string */ |
||
| 24 | private $value; |
||
| 25 | |||
| 26 | private function __construct(string $key, string $value) |
||
| 30 | } |
||
| 31 | |||
| 32 | /** |
||
| 33 | * Produces a condition that checks a discriminator key/value combination. |
||
| 34 | * |
||
| 35 | * @param string $key The discriminator key, for instance a column name. |
||
| 36 | * @param string $value The discriminator value to be triggered by. |
||
| 37 | * @return Specifies The discriminating condition. |
||
| 38 | */ |
||
| 39 | public static function of(string $key, string $value): Specifies |
||
| 40 | { |
||
| 41 | return new self($key, $value); |
||
| 42 | } |
||
| 43 | |||
| 44 | /** @inheritdoc */ |
||
| 45 | public function isSatisfiedBy($input): bool |
||
| 49 | } |
||
| 50 | } |
||
| 51 |