| Conditions | 2 |
| Paths | 2 |
| Total Lines | 19 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 6 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 31 | public function check($value): bool |
||
| 32 | { |
||
| 33 | $this->requireParameters($this->fillableParams); |
||
| 34 | |||
| 35 | $anotherAttribute = $this->parameter('field'); |
||
| 36 | $anotherValue = $this->getAttribute()->getValue($anotherAttribute); |
||
| 37 | |||
| 38 | $this->setParameterTextValues((array) $anotherAttribute, 'other_attribute'); |
||
| 39 | |||
| 40 | if (Rule::accepted()->check($anotherValue)) { |
||
| 41 | $requiredValidator = $this->getRuleValidator('required'); |
||
| 42 | |||
| 43 | $requiredValidator->setValidation($this->validation); |
||
|
|
|||
| 44 | $requiredValidator->setAttribute($this->attribute); |
||
| 45 | |||
| 46 | return $requiredValidator->check($value); |
||
| 47 | } |
||
| 48 | |||
| 49 | return true; |
||
| 50 | } |
||
| 52 |