@@ -21,9 +21,9 @@ discard block |
||
| 21 | 21 | */ |
| 22 | 22 | public static function bootHasCompositePrimaryKey() |
| 23 | 23 | { |
| 24 | - static::creating(function ($model) { |
|
| 25 | - foreach($model->getRawKeyName() as $key) { |
|
| 26 | - if(!isset($model->{$key}) && in_array($key, $model->getBinaryColumns())) { |
|
| 24 | + static::creating(function($model) { |
|
| 25 | + foreach ($model->getRawKeyName() as $key) { |
|
| 26 | + if (!isset($model->{$key}) && in_array($key, $model->getBinaryColumns())) { |
|
| 27 | 27 | $v = uniqid(rand(), true); |
| 28 | 28 | $model->{$key} = $model->hexBinaryColumns() ? strtoupper( |
| 29 | 29 | md5($v) |
@@ -157,7 +157,7 @@ discard block |
||
| 157 | 157 | } else { |
| 158 | 158 | //remap hex ID to binary ID even if index is not composite |
| 159 | 159 | if ($this->shouldProcessBinaryAttribute($keys[0])) { |
| 160 | - $ids = array_map(function ($hex) { |
|
| 160 | + $ids = array_map(function($hex) { |
|
| 161 | 161 | return hex2bin($hex); |
| 162 | 162 | }, $ids); |
| 163 | 163 | } |
@@ -187,7 +187,7 @@ discard block |
||
| 187 | 187 | |
| 188 | 188 | return $this->newQueryWithoutScopes()->applyIds( |
| 189 | 189 | array_map( |
| 190 | - function ($normalizedKey) { |
|
| 190 | + function($normalizedKey) { |
|
| 191 | 191 | return $this->parseNormalizedKey($normalizedKey); |
| 192 | 192 | }, |
| 193 | 193 | $ids |