@@ -25,11 +25,11 @@ discard block |
||
| 25 | 25 | |
| 26 | 26 | public static function bootVersionable() |
| 27 | 27 | { |
| 28 | - static::saved(function (Model $model) { |
|
| 28 | + static::saved(function(Model $model) { |
|
| 29 | 29 | self::createVersionForModel($model); |
| 30 | 30 | }); |
| 31 | 31 | |
| 32 | - static::deleted(function (Model $model) { |
|
| 32 | + static::deleted(function(Model $model) { |
|
| 33 | 33 | if ($model->forceDeleting) { |
| 34 | 34 | $model->forceRemoveAllVersions(); |
| 35 | 35 | } else { |
@@ -162,7 +162,7 @@ discard block |
||
| 162 | 162 | $changes = $this->getDirty(); |
| 163 | 163 | |
| 164 | 164 | if (empty($changes)) { |
| 165 | - return []; |
|
| 165 | + return [ ]; |
|
| 166 | 166 | } |
| 167 | 167 | |
| 168 | 168 | $contents = $this->attributesToArray(); |
@@ -215,7 +215,7 @@ discard block |
||
| 215 | 215 | */ |
| 216 | 216 | public function getVersionable(): array |
| 217 | 217 | { |
| 218 | - return \property_exists($this, 'versionable') ? $this->versionable : []; |
|
| 218 | + return \property_exists($this, 'versionable') ? $this->versionable : [ ]; |
|
| 219 | 219 | } |
| 220 | 220 | |
| 221 | 221 | /** |
@@ -223,7 +223,7 @@ discard block |
||
| 223 | 223 | */ |
| 224 | 224 | public function getDontVersionable(): array |
| 225 | 225 | { |
| 226 | - return \property_exists($this, 'dontVersionable') ? $this->dontVersionable : []; |
|
| 226 | + return \property_exists($this, 'dontVersionable') ? $this->dontVersionable : [ ]; |
|
| 227 | 227 | } |
| 228 | 228 | |
| 229 | 229 | /** |
@@ -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'); |
@@ -13,7 +13,7 @@ discard block |
||
| 13 | 13 | */ |
| 14 | 14 | public function up() |
| 15 | 15 | { |
| 16 | - Schema::table('versions', function (Blueprint $table) { |
|
| 16 | + Schema::table('versions', function(Blueprint $table) { |
|
| 17 | 17 | $table->softDeletes(); |
| 18 | 18 | }); |
| 19 | 19 | } |
@@ -25,7 +25,7 @@ discard block |
||
| 25 | 25 | */ |
| 26 | 26 | public function down() |
| 27 | 27 | { |
| 28 | - Schema::table('versions', function (Blueprint $table) { |
|
| 28 | + Schema::table('versions', function(Blueprint $table) { |
|
| 29 | 29 | // |
| 30 | 30 | }); |
| 31 | 31 | } |