Completed
Branch master (52eecb)
by Carlos
04:24
created
Category
migrations/2019_05_31_042934_create_versions_table.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@
 block discarded – undo
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');
Please login to merge, or discard this patch.
src/Versionable.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -22,14 +22,14 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
     /**
Please login to merge, or discard this patch.