@@ -30,18 +30,18 @@ discard block |
||
| 30 | 30 | */ |
| 31 | 31 | protected static function bootBooleanTimestampFieldManipulator() |
| 32 | 32 | { |
| 33 | - static::saving(function (self $model) { |
|
| 33 | + static::saving(function(self $model) { |
|
| 34 | 34 | foreach ((array) $model::$boolTimestampFields as $field) { |
| 35 | 35 | unset($model->attributes[$model->getAppendableAttributeName($field)]); |
| 36 | 36 | } |
| 37 | 37 | }); |
| 38 | 38 | |
| 39 | - static::saved(function (self $model) { |
|
| 39 | + static::saved(function(self $model) { |
|
| 40 | 40 | $model->setBoolTimestampFieldsIntoAttributes($model); |
| 41 | 41 | }); |
| 42 | 42 | |
| 43 | 43 | if (method_exists(__CLASS__, 'retrieved')) { |
| 44 | - static::retrieved(function (self $model) { |
|
| 44 | + static::retrieved(function(self $model) { |
|
| 45 | 45 | $model->setBoolTimestampFieldsIntoAttributes($model); |
| 46 | 46 | }); |
| 47 | 47 | } |
@@ -102,7 +102,7 @@ discard block |
||
| 102 | 102 | |
| 103 | 103 | private static function getAppendableAttributeName($field) |
| 104 | 104 | { |
| 105 | - return 'time_being_'.preg_replace('/^is_/', '', $field); |
|
| 105 | + return 'time_being_' . preg_replace('/^is_/', '', $field); |
|
| 106 | 106 | } |
| 107 | 107 | |
| 108 | 108 | private function setBoolTimestampFieldsIntoAttributes(self $model, $checkAttributeExists = false) |