Conditions | 4 |
Paths | 3 |
Total Lines | 16 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
35 | public function setValue($value, $record = null, $markChanged = true) |
||
36 | { |
||
37 | // Return early if we keep encrypted value in memory |
||
38 | if (!EncryptHelper::getAutomaticDecryption()) { |
||
39 | $this->value = $value; |
||
40 | return $this; |
||
41 | } |
||
42 | |||
43 | // $markChanged is not used |
||
44 | // The value might come encrypted from the database |
||
45 | if ($value && EncryptHelper::isEncrypted($value)) { |
||
46 | $this->value = $this->decryptValue($value); |
||
47 | } else { |
||
48 | $this->value = $value; |
||
49 | } |
||
50 | return $this; |
||
51 | } |
||
53 |