@@ -56,14 +56,14 @@ discard block |
||
| 56 | 56 | } |
| 57 | 57 | |
| 58 | 58 | protected function processNumeric($name, $value) { |
| 59 | - if(!is_int($value) && !is_float($value)) { |
|
| 59 | + if (!is_int($value) && !is_float($value)) { |
|
| 60 | 60 | return; |
| 61 | 61 | } |
| 62 | 62 | |
| 63 | 63 | // If no original value and new value is set - then we take new value as old value |
| 64 | - if(empty($this->original[$name]) && !empty($value)) { |
|
| 64 | + if (empty($this->original[$name]) && !empty($value)) { |
|
| 65 | 65 | $this->original[$name] = $value; |
| 66 | - } elseif(!empty($this->original[$name]) && $value != $this->original[$name]) { |
|
| 66 | + } elseif (!empty($this->original[$name]) && $value != $this->original[$name]) { |
|
| 67 | 67 | // New value not equal original value. We should update delta |
| 68 | 68 | $this->delta[$name] = $value - $this->original[$name]; |
| 69 | 69 | } |
@@ -71,7 +71,7 @@ discard block |
||
| 71 | 71 | |
| 72 | 72 | public function __set($name, $value) { |
| 73 | 73 | $properties = $this->model->getProperties(); |
| 74 | - if(isset($properties[$name][P_DB_FIELD_TYPE])) { |
|
| 74 | + if (isset($properties[$name][P_DB_FIELD_TYPE])) { |
|
| 75 | 75 | $value = \classSupernova::$gc->types->castAs($properties[$name][P_DB_FIELD_TYPE], $value); |
| 76 | 76 | } |
| 77 | 77 | |
@@ -75,7 +75,7 @@ |
||
| 75 | 75 | $this->rowOperator = $gc->dbGlobalRowOperator; |
| 76 | 76 | $this->accessors = new Accessors(); |
| 77 | 77 | |
| 78 | - if(property_exists($this, 'newProperties') && !empty($this->newProperties)) { |
|
| 78 | + if (property_exists($this, 'newProperties') && !empty($this->newProperties)) { |
|
| 79 | 79 | $this->extendProperties($this->newProperties); |
| 80 | 80 | } |
| 81 | 81 | } |