@@ -247,8 +247,8 @@ discard block |
||
| 247 | 247 | $split = explode('\\', $class); |
| 248 | 248 | $class = end($split); |
| 249 | 249 | |
| 250 | - return preg_replace_callback('/([A-Z])/', function ($matches) { |
|
| 251 | - return '_' . strtolower($matches[1]); |
|
| 250 | + return preg_replace_callback('/([A-Z])/', function($matches) { |
|
| 251 | + return '_'.strtolower($matches[1]); |
|
| 252 | 252 | }, lcfirst($class)); |
| 253 | 253 | } |
| 254 | 254 | |
@@ -260,7 +260,7 @@ discard block |
||
| 260 | 260 | */ |
| 261 | 261 | protected function prepareForeignKey($class) |
| 262 | 262 | { |
| 263 | - return $this->delimitClass($class) . '_id'; |
|
| 263 | + return $this->delimitClass($class).'_id'; |
|
| 264 | 264 | } |
| 265 | 265 | |
| 266 | 266 | /** |
@@ -428,7 +428,7 @@ discard block |
||
| 428 | 428 | |
| 429 | 429 | foreach (static::arrayify($instances) as $instance) { |
| 430 | 430 | if (!$instance instanceof $class) { |
| 431 | - throw new Exception('Related models must be an instance of ' . $class); |
|
| 431 | + throw new Exception('Related models must be an instance of '.$class); |
|
| 432 | 432 | } |
| 433 | 433 | } |
| 434 | 434 | } |
@@ -578,7 +578,7 @@ discard block |
||
| 578 | 578 | ->filters($this->filter()) |
| 579 | 579 | ->orders($this->order()); |
| 580 | 580 | |
| 581 | - $builder->callback(function ($result) use ($class) { |
|
| 581 | + $builder->callback(function($result) use ($class) { |
|
| 582 | 582 | return $class::hydrate($result->data); |
| 583 | 583 | }); |
| 584 | 584 | |
@@ -788,7 +788,7 @@ discard block |
||
| 788 | 788 | |
| 789 | 789 | // Filter the IDs to associate and dissociate if any have been given |
| 790 | 790 | if (!empty($ids)) { |
| 791 | - $filter = function ($instance) use ($ids) { |
|
| 791 | + $filter = function($instance) use ($ids) { |
|
| 792 | 792 | return in_array($instance->id(), $ids); |
| 793 | 793 | }; |
| 794 | 794 | |
@@ -802,7 +802,7 @@ discard block |
||
| 802 | 802 | } |
| 803 | 803 | |
| 804 | 804 | // Dissociate, then associate |
| 805 | - if (!empty($detached)) { |
|
| 805 | + if (!empty($detached)) { |
|
| 806 | 806 | $this->dissociate($detached); |
| 807 | 807 | } |
| 808 | 808 | |