@@ -12,7 +12,7 @@ discard block |
||
| 12 | 12 | */ |
| 13 | 13 | public function encrypter() |
| 14 | 14 | { |
| 15 | - if(! $this->magrosEncrypter){ |
|
| 15 | + if (!$this->magrosEncrypter) { |
|
| 16 | 16 | $this->magrosEncrypter = new Encrypter(); |
| 17 | 17 | } |
| 18 | 18 | return $this->magrosEncrypter; |
@@ -32,7 +32,7 @@ discard block |
||
| 32 | 32 | */ |
| 33 | 33 | public function encryptable($key) |
| 34 | 34 | { |
| 35 | - if(self::$enableEncryption){ |
|
| 35 | + if (self::$enableEncryption) { |
|
| 36 | 36 | return in_array($key, $this->encryptable); |
| 37 | 37 | } |
| 38 | 38 | return false; |
@@ -57,7 +57,7 @@ discard block |
||
| 57 | 57 | */ |
| 58 | 58 | public function decryptAttribute($value) |
| 59 | 59 | { |
| 60 | - if($value) { |
|
| 60 | + if ($value) { |
|
| 61 | 61 | return $this->encrypter()->decrypt($value) ?: $value; |
| 62 | 62 | } |
| 63 | 63 | |
@@ -95,7 +95,7 @@ discard block |
||
| 95 | 95 | if ($this->encryptable($key)) { |
| 96 | 96 | $value = $this->decryptAttribute($value); |
| 97 | 97 | } |
| 98 | - if ($this->isCamelcase($key)){ |
|
| 98 | + if ($this->isCamelcase($key)) { |
|
| 99 | 99 | $value = $this->camelCaseAttribute($value); |
| 100 | 100 | } |
| 101 | 101 | |
@@ -132,7 +132,7 @@ discard block |
||
| 132 | 132 | if ($this->encryptable($key)) { |
| 133 | 133 | $attributes[$key] = $this->decryptAttribute($attribute); |
| 134 | 134 | } |
| 135 | - if ($this->isCamelcase($key)){ |
|
| 135 | + if ($this->isCamelcase($key)) { |
|
| 136 | 136 | $attributes[$key] = $this->camelCaseAttribute($attributes[$key]); |
| 137 | 137 | } |
| 138 | 138 | } |