| @@ -23,7 +23,7 @@ | ||
| 23 | 23 | $schema->nullable(); | 
| 24 | 24 | } | 
| 25 | 25 | |
| 26 | -    if (! isset($options['no_reference'])) { | |
| 26 | +    if ( ! isset($options['no_reference'])) { | |
| 27 | 27 | $this->referenceOn($fk, $table, $reference); | 
| 28 | 28 | } | 
| 29 | 29 | |
| @@ -30,9 +30,9 @@ | ||
| 30 | 30 | return $schema; | 
| 31 | 31 | }); | 
| 32 | 32 | |
| 33 | - Blueprint::macro('addNullableForeign', function($table, $fk, $bigInteger = false) { | |
| 34 | -     return $this->addForeign($table, ['nullable' => true, 'fk' => $fk, 'bigInteger' => $bigInteger])->comment('Nullable FK for ' . $table); | |
| 35 | - }); | |
| 33 | +    Blueprint::macro('addNullableForeign', function($table, $fk, $bigInteger = false) { | |
| 34 | +        return $this->addForeign($table, ['nullable' => true, 'fk' => $fk, 'bigInteger' => $bigInteger])->comment('Nullable FK for ' . $table); | |
| 35 | + }); | |
| 36 | 36 | |
| 37 | 37 |  Blueprint::macro('referenceOn', function($key, $table, $reference = 'id') { | 
| 38 | 38 | return $this->foreign($key) | 
| @@ -29,7 +29,7 @@ | ||
| 29 | 29 | |
| 30 | 30 |  Blueprint::macro('by', function($table, $key = null, $nullable = true, $bigInteger = false, $suffix = '_by') { | 
| 31 | 31 | return $this->addForeign($table, [ | 
| 32 | - 'fk' => (! is_null($key) ? $key . $suffix : null), | |
| 32 | + 'fk' => ( ! is_null($key) ? $key . $suffix : null), | |
| 33 | 33 | 'nullable' => $nullable, | 
| 34 | 34 | 'bigInteger' => $bigInteger, | 
| 35 | 35 | ]); | 
| @@ -7,7 +7,7 @@ discard block | ||
| 7 | 7 | /* | 
| 8 | 8 | * Create an index if it doesn't exist yet | 
| 9 | 9 | */ | 
| 10 | -Blueprint::macro('createIndexIfNotExists', function ($columns, $name = null, $connection = null) { | |
| 10 | +Blueprint::macro('createIndexIfNotExists', function($columns, $name = null, $connection = null) { | |
| 11 | 11 | return $this->hasIndex($columns, $connection) | 
| 12 | 12 | ? $this | 
| 13 | 13 | : $this->index($columns, $name ?: $this->createIndexNameByColumns($columns)); | 
| @@ -16,21 +16,21 @@ discard block | ||
| 16 | 16 | /* | 
| 17 | 17 | * Check if an index exists | 
| 18 | 18 | */ | 
| 19 | -Blueprint::macro('hasIndex', function ($columns) { | |
| 19 | +Blueprint::macro('hasIndex', function($columns) { | |
| 20 | 20 | return $this->getIndexNameByColumns($columns) !== null; | 
| 21 | 21 | }); | 
| 22 | 22 | |
| 23 | 23 | /* | 
| 24 | 24 | * Get an index name by columns | 
| 25 | 25 | */ | 
| 26 | -Blueprint::macro('getIndexNameByColumns', function ($columns) { | |
| 26 | +Blueprint::macro('getIndexNameByColumns', function($columns) { | |
| 27 | 27 |      if (is_string($columns)) { | 
| 28 | 28 | $columns = [$columns]; | 
| 29 | 29 | } | 
| 30 | 30 | |
| 31 | 31 | $schemaManager = Schema::getConnection()->getDoctrineSchemaManager(); | 
| 32 | 32 | $indices = $schemaManager->listTableIndexes($this->getTable()); | 
| 33 | -    $filteredIndices = collect($indices)->filter(function (Index $index) use ($columns) { | |
| 33 | +    $filteredIndices = collect($indices)->filter(function(Index $index) use ($columns) { | |
| 34 | 34 | return compare_array($index->getColumns(), $columns); | 
| 35 | 35 | }); | 
| 36 | 36 | |
| @@ -44,7 +44,7 @@ discard block | ||
| 44 | 44 | /* | 
| 45 | 45 | * Create an index name based on columns | 
| 46 | 46 | */ | 
| 47 | -Blueprint::macro('createIndexNameByColumns', function ($columns) { | |
| 47 | +Blueprint::macro('createIndexNameByColumns', function($columns) { | |
| 48 | 48 |      if (is_string($columns)) { | 
| 49 | 49 | $columns = [$columns]; | 
| 50 | 50 | } | 
| @@ -61,7 +61,7 @@ discard block | ||
| 61 | 61 | /* | 
| 62 | 62 | * Drop an index if it exists | 
| 63 | 63 | */ | 
| 64 | -Blueprint::macro('dropIndexIfExists', function ($columns) { | |
| 64 | +Blueprint::macro('dropIndexIfExists', function($columns) { | |
| 65 | 65 |      if ($this->hasIndex($columns)) { | 
| 66 | 66 | return $this->dropIndex($this->getIndexNameByColumns($columns)); | 
| 67 | 67 | } | 
| @@ -69,7 +69,7 @@ discard block | ||
| 69 | 69 | return $this; | 
| 70 | 70 | }); | 
| 71 | 71 | |
| 72 | -if (!function_exists('compare_array')) { | |
| 72 | +if ( ! function_exists('compare_array')) { | |
| 73 | 73 | /** | 
| 74 | 74 | * @param $arrayA | 
| 75 | 75 | * @param $arrayB |