Total Complexity | 5 |
Total Lines | 39 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
14 | final class Check implements MapsProperty |
||
15 | { |
||
16 | private $constraint; |
||
17 | private $mapping; |
||
18 | |||
19 | private function __construct(Satisfiable $constraint, MapsProperty $mapping) |
||
23 | } |
||
24 | |||
25 | /** |
||
26 | * Creates a check for on a property mapping. |
||
27 | * |
||
28 | * @param Satisfiable $constraint The constraint for the property. |
||
29 | * @param MapsProperty $mapping The mapping for the property. |
||
30 | * @return MapsProperty The checked property mapping. |
||
31 | */ |
||
32 | public static function that( |
||
33 | Satisfiable $constraint, |
||
34 | MapsProperty $mapping |
||
35 | ): MapsProperty { |
||
36 | return new Check($constraint, $mapping); |
||
37 | } |
||
38 | |||
39 | /** @inheritdoc */ |
||
40 | public function name(): string |
||
43 | } |
||
44 | |||
45 | /** @inheritdoc */ |
||
46 | public function value(array $data, $owner = null) |
||
53 | } |
||
54 | } |
||
55 |