@@ -38,7 +38,7 @@ discard block |
||
| 38 | 38 | */ |
| 39 | 39 | public function deleting(Model $model) |
| 40 | 40 | { |
| 41 | - if ($model->usingSoftDeletes()) { |
|
| 41 | + if ( $model->usingSoftDeletes() ) { |
|
| 42 | 42 | $model->{config('userstamps.deleted_by_column')} = $this->getUsersPrimaryValue(); |
| 43 | 43 | $model->{config('userstamps.updated_by_column')} = $this->getUsersPrimaryValue(); |
| 44 | 44 | $this->saveWithoutEventDispatching($model); |
@@ -53,7 +53,7 @@ discard block |
||
| 53 | 53 | */ |
| 54 | 54 | public function restoring(Model $model) |
| 55 | 55 | { |
| 56 | - if ($model->usingSoftDeletes()) { |
|
| 56 | + if ( $model->usingSoftDeletes() ) { |
|
| 57 | 57 | $model->{config('userstamps.deleted_by_column')} = null; |
| 58 | 58 | $model->{config('userstamps.updated_by_column')} = $this->getUsersPrimaryValue(); |
| 59 | 59 | $this->saveWithoutEventDispatching($model); |
@@ -85,11 +85,11 @@ discard block |
||
| 85 | 85 | */ |
| 86 | 86 | private function getUsersPrimaryValue() |
| 87 | 87 | { |
| 88 | - if (! Auth::check()) { |
|
| 88 | + if ( !Auth::check() ) { |
|
| 89 | 89 | return null; |
| 90 | 90 | } |
| 91 | 91 | |
| 92 | - if (config('userstamps.users_table_column_id_name') !== 'id') { |
|
| 92 | + if ( config('userstamps.users_table_column_id_name') !== 'id' ) { |
|
| 93 | 93 | return Auth::user()->{config('userstamps.users_table_column_id_name')}; |
| 94 | 94 | } |
| 95 | 95 | |
@@ -23,11 +23,11 @@ discard block |
||
| 23 | 23 | |
| 24 | 24 | private function registerUserstamps() |
| 25 | 25 | { |
| 26 | - Blueprint::macro('userstamps', function () { |
|
| 27 | - if (config('userstamps.users_table_column_type') === 'bigIncrements') { |
|
| 26 | + Blueprint::macro('userstamps', function() { |
|
| 27 | + if ( config('userstamps.users_table_column_type') === 'bigIncrements' ) { |
|
| 28 | 28 | $this->unsignedBigInteger(config('userstamps.created_by_column'))->nullable(); |
| 29 | 29 | $this->unsignedBigInteger(config('userstamps.updated_by_column'))->nullable(); |
| 30 | - } else if (config('userstamps.users_table_column_type') === 'uuid') { |
|
| 30 | + } else if ( config('userstamps.users_table_column_type') === 'uuid' ) { |
|
| 31 | 31 | $this->uuid(config('userstamps.created_by_column'))->nullable(); |
| 32 | 32 | $this->uuid(config('userstamps.updated_by_column'))->nullable(); |
| 33 | 33 | } else { |
@@ -51,10 +51,10 @@ discard block |
||
| 51 | 51 | |
| 52 | 52 | private function registerSoftUserstamps() |
| 53 | 53 | { |
| 54 | - Blueprint::macro('softUserstamps', function () { |
|
| 55 | - if (config('userstamps.users_table_column_type') === 'bigIncrements') { |
|
| 54 | + Blueprint::macro('softUserstamps', function() { |
|
| 55 | + if ( config('userstamps.users_table_column_type') === 'bigIncrements' ) { |
|
| 56 | 56 | $this->unsignedBigInteger(config('userstamps.deleted_by_column'))->nullable(); |
| 57 | - } else if (config('userstamps.users_table_column_type') === 'uuid') { |
|
| 57 | + } else if ( config('userstamps.users_table_column_type') === 'uuid' ) { |
|
| 58 | 58 | $this->uuid(config('userstamps.deleted_by_column'))->nullable(); |
| 59 | 59 | } else { |
| 60 | 60 | $this->unsignedInteger(config('userstamps.deleted_by_column'))->nullable(); |
@@ -71,14 +71,14 @@ discard block |
||
| 71 | 71 | |
| 72 | 72 | private function registerDropUserstamps() |
| 73 | 73 | { |
| 74 | - Blueprint::macro('dropUserstamps', function () { |
|
| 75 | - if (! DB::connection() instanceof SQLiteConnection) { |
|
| 74 | + Blueprint::macro('dropUserstamps', function() { |
|
| 75 | + if ( !DB::connection() instanceof SQLiteConnection ) { |
|
| 76 | 76 | $this->dropForeign([ |
| 77 | 77 | config('userstamps.created_by_column'), |
| 78 | 78 | ]); |
| 79 | 79 | } |
| 80 | 80 | |
| 81 | - if (! DB::connection() instanceof SQLiteConnection) { |
|
| 81 | + if ( !DB::connection() instanceof SQLiteConnection ) { |
|
| 82 | 82 | $this->dropForeign([ |
| 83 | 83 | config('userstamps.updated_by_column'), |
| 84 | 84 | ]); |
@@ -93,8 +93,8 @@ discard block |
||
| 93 | 93 | |
| 94 | 94 | private function registerDropSoftUserstamps() |
| 95 | 95 | { |
| 96 | - Blueprint::macro('dropSoftUserstamps', function () { |
|
| 97 | - if (! DB::connection() instanceof SQLiteConnection) { |
|
| 96 | + Blueprint::macro('dropSoftUserstamps', function() { |
|
| 97 | + if ( !DB::connection() instanceof SQLiteConnection ) { |
|
| 98 | 98 | $this->dropForeign([ |
| 99 | 99 | config('userstamps.deleted_by_column'), |
| 100 | 100 | ]); |