@@ -19,7 +19,7 @@ |
||
19 | 19 | */ |
20 | 20 | public function up() |
21 | 21 | { |
22 | - Schema::create('versions', function (Blueprint $table) { |
|
22 | + Schema::create('versions', function(Blueprint $table) { |
|
23 | 23 | $table->bigIncrements('id'); |
24 | 24 | $table->unsignedBigInteger(config('versionable.user_foreign_key', 'user_id')); |
25 | 25 | $table->morphs('versionable'); |
@@ -22,14 +22,14 @@ discard block |
||
22 | 22 | |
23 | 23 | public static function bootVersionable() |
24 | 24 | { |
25 | - static::saved(function (Model $model) { |
|
25 | + static::saved(function(Model $model) { |
|
26 | 26 | if ($model->shouldVersioning()) { |
27 | 27 | Version::createForModel($model); |
28 | 28 | $model->removeOldVersions($model->getKeepVersionsCount()); |
29 | 29 | } |
30 | 30 | }); |
31 | 31 | |
32 | - static::deleted(function (Model $model) { |
|
32 | + static::deleted(function(Model $model) { |
|
33 | 33 | $model->removeAllVersions(); |
34 | 34 | }); |
35 | 35 | } |
@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | $changes = $this->getDirty(); |
104 | 104 | |
105 | 105 | if (empty($changes)) { |
106 | - return []; |
|
106 | + return [ ]; |
|
107 | 107 | } |
108 | 108 | |
109 | 109 | return $this->versionableFromArray($changes); |
@@ -150,7 +150,7 @@ discard block |
||
150 | 150 | */ |
151 | 151 | public function getVersionable(): array |
152 | 152 | { |
153 | - return \property_exists($this, 'versionable') ? $this->versionable : []; |
|
153 | + return \property_exists($this, 'versionable') ? $this->versionable : [ ]; |
|
154 | 154 | } |
155 | 155 | |
156 | 156 | /** |
@@ -158,7 +158,7 @@ discard block |
||
158 | 158 | */ |
159 | 159 | public function getDontVersionable(): array |
160 | 160 | { |
161 | - return \property_exists($this, 'dontVersionable') ? $this->dontVersionable : []; |
|
161 | + return \property_exists($this, 'dontVersionable') ? $this->dontVersionable : [ ]; |
|
162 | 162 | } |
163 | 163 | |
164 | 164 | /** |