@@ -88,7 +88,7 @@ discard block |
||
| 88 | 88 | */ |
| 89 | 89 | public function get($attribute) |
| 90 | 90 | { |
| 91 | - list($attribute, $subattribute) = array_pad(explode('.', $attribute, 2), 2, null); |
|
| 91 | + list($attribute, $subattribute) = array_pad(explode('.', $attribute, 2), 2, null); |
|
| 92 | 92 | |
| 93 | 93 | if ($this->hasRelation($attribute)) { |
| 94 | 94 | $related = $this->related($attribute); |
@@ -138,9 +138,9 @@ discard block |
||
| 138 | 138 | $split = explode('\\', get_class($this)); |
| 139 | 139 | $class = end($split); |
| 140 | 140 | |
| 141 | - return preg_replace_callback('/([A-Z])/', function ($matches) { |
|
| 142 | - return '_' . strtolower($matches[1]); |
|
| 143 | - }, lcfirst($class)) . 's'; |
|
| 141 | + return preg_replace_callback('/([A-Z])/', function($matches) { |
|
| 142 | + return '_'.strtolower($matches[1]); |
|
| 143 | + }, lcfirst($class)).'s'; |
|
| 144 | 144 | } |
| 145 | 145 | |
| 146 | 146 | /** |
@@ -379,7 +379,7 @@ discard block |
||
| 379 | 379 | $storage = $instance->storage(); |
| 380 | 380 | |
| 381 | 381 | if (!$storage instanceof Searchable) { |
| 382 | - throw new Exception(get_class($instance) . ' storage is not searchable'); |
|
| 382 | + throw new Exception(get_class($instance).' storage is not searchable'); |
|
| 383 | 383 | } |
| 384 | 384 | |
| 385 | 385 | $attributes = $attributes ?: $instance->defaultSearchAttributes(); |
@@ -443,13 +443,13 @@ discard block |
||
| 443 | 443 | $storage = $instance->storage(); |
| 444 | 444 | |
| 445 | 445 | if (!$storage instanceof Queryable) { |
| 446 | - throw new Exception(get_class($instance) . ' storage is not queryable'); |
|
| 446 | + throw new Exception(get_class($instance).' storage is not queryable'); |
|
| 447 | 447 | } |
| 448 | 448 | |
| 449 | 449 | $query = new Query($instance->table()); |
| 450 | 450 | $builder = new Builder($query, $storage); |
| 451 | 451 | |
| 452 | - $builder->callback(function ($result) use ($instance) { |
|
| 452 | + $builder->callback(function($result) use ($instance) { |
|
| 453 | 453 | return $instance::hydrate($result->data); |
| 454 | 454 | }); |
| 455 | 455 | |
@@ -471,7 +471,7 @@ discard block |
||
| 471 | 471 | $class = get_class($this); |
| 472 | 472 | |
| 473 | 473 | if (!$storage instanceof Modifiable) { |
| 474 | - throw new Exception($class . ' storage is not modifiable'); |
|
| 474 | + throw new Exception($class.' storage is not modifiable'); |
|
| 475 | 475 | } |
| 476 | 476 | |
| 477 | 477 | $data = $this->prepareData(); |