| Conditions | 3 |
| Paths | 3 |
| Total Lines | 14 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 3 |
| Changes | 0 | ||
| 1 | <?php |
||
| 31 | 24 | public function __invoke($subject): bool |
|
| 32 | { |
||
| 33 | 24 | if (!$this->subjectFieldIsBlank($subject)) { |
|
| 34 | 9 | return parent::__invoke($subject); |
|
| 35 | } |
||
| 36 | |||
| 37 | 15 | if (!$this->allowBlanks) { |
|
| 38 | 9 | return false; |
|
| 39 | } |
||
| 40 | |||
| 41 | 6 | $subject->{$this->field} = $this->blankValue; |
|
| 42 | |||
| 43 | 6 | return true; |
|
| 44 | } |
||
| 45 | |||
| 94 |