@@ -12,13 +12,13 @@ discard block |
||
| 12 | 12 | { |
| 13 | 13 | use CompositeRelationships; |
| 14 | 14 | |
| 15 | - private function normalizeValue($value){ |
|
| 15 | + private function normalizeValue($value) { |
|
| 16 | 16 | return ctype_xdigit($value) ? $this->getQuery()->getModel()->recoverBinaryKey($this->relatedKey, $value) : $value; |
| 17 | 17 | } |
| 18 | 18 | |
| 19 | 19 | private function normalizeIds($ids) |
| 20 | 20 | { |
| 21 | - return $this->getQuery()->getModel()->hexBinaryColumns() ? (is_array($ids) ? array_map(function ($id) { |
|
| 21 | + return $this->getQuery()->getModel()->hexBinaryColumns() ? (is_array($ids) ? array_map(function($id) { |
|
| 22 | 22 | return $this->normalizeValue($id); |
| 23 | 23 | }, $ids) : $this->normalizeValue($ids)) : $ids; |
| 24 | 24 | } |
@@ -33,7 +33,7 @@ discard block |
||
| 33 | 33 | protected function parseIds($value) |
| 34 | 34 | { |
| 35 | 35 | if ($value instanceof Model) { |
| 36 | - return [$this->executeWithinOptionalBinaryTransformation(function () use ($value) { |
|
| 36 | + return [$this->executeWithinOptionalBinaryTransformation(function() use ($value) { |
|
| 37 | 37 | return $value->{$this->relatedKey}; |
| 38 | 38 | }, $value)]; |
| 39 | 39 | } |
@@ -46,7 +46,7 @@ discard block |
||
| 46 | 46 | return $this->normalizeIds($value->toArray()); |
| 47 | 47 | } |
| 48 | 48 | |
| 49 | - return (array)$this->normalizeIds($value); |
|
| 49 | + return (array) $this->normalizeIds($value); |
|
| 50 | 50 | } |
| 51 | 51 | |
| 52 | 52 | /** |
@@ -58,7 +58,7 @@ discard block |
||
| 58 | 58 | */ |
| 59 | 59 | protected function parseId($value) |
| 60 | 60 | { |
| 61 | - return $value instanceof Model ? $this->executeWithinOptionalBinaryTransformation(function () use ($value) { |
|
| 61 | + return $value instanceof Model ? $this->executeWithinOptionalBinaryTransformation(function() use ($value) { |
|
| 62 | 62 | $value->{$this->relatedKey}; |
| 63 | 63 | }, $value) : $value; |
| 64 | 64 | } |
@@ -80,7 +80,7 @@ discard block |
||
| 80 | 80 | call_user_func_array([$query, 'whereIn'], $arguments); |
| 81 | 81 | } |
| 82 | 82 | |
| 83 | - return $this->executeWithinOptionalBinaryTransformation(function () use ($query) { |
|
| 83 | + return $this->executeWithinOptionalBinaryTransformation(function() use ($query) { |
|
| 84 | 84 | return $query->where($this->foreignPivotKey, $this->parent->{$this->parentKey}); |
| 85 | 85 | }, $this->parent); |
| 86 | 86 | } |
@@ -97,7 +97,7 @@ discard block |
||
| 97 | 97 | { |
| 98 | 98 | $record[$this->relatedPivotKey] = $id; |
| 99 | 99 | |
| 100 | - $record[$this->foreignPivotKey] = $this->executeWithinOptionalBinaryTransformation(function () { |
|
| 100 | + $record[$this->foreignPivotKey] = $this->executeWithinOptionalBinaryTransformation(function() { |
|
| 101 | 101 | return $this->parent->{$this->parentKey}; |
| 102 | 102 | }, $this->parent); |
| 103 | 103 | |