Conditions | 4 |
Paths | 3 |
Total Lines | 12 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
28 | public function getValidationRules() |
||
29 | { |
||
30 | $rules = parent::getValidationRules(); |
||
31 | |||
32 | if ($this->isNotRequiredWithUpdate() && $this->getModel()->exists) { |
||
33 | if (($key = array_search('required', $rules[$this->getName()])) !== false) { |
||
34 | unset($rules[$this->getName()][$key]); |
||
35 | } |
||
36 | } |
||
37 | |||
38 | return $rules; |
||
39 | } |
||
40 | |||
76 |