Total Complexity | 3 |
Total Lines | 30 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php |
||
5 | class Field implements SanitizeRuleInterface |
||
6 | { |
||
7 | /** @var string */ |
||
8 | protected $otherField; |
||
9 | |||
10 | /** |
||
11 | * @param string $other_field The name of the other subject field. |
||
12 | */ |
||
13 | 18 | public function __construct(string $otherField) |
|
16 | 18 | } |
|
17 | |||
18 | /** |
||
19 | * Modifies the field value to match that of another field. |
||
20 | * |
||
21 | * @param object $subject The subject to be filtered. |
||
22 | * @param string $field The subject field name. |
||
23 | * |
||
24 | * @return bool True if the value was sanitized, false if not. |
||
25 | */ |
||
26 | 18 | public function __invoke($subject, string $field): bool |
|
37 |