@@ -89,7 +89,7 @@ discard block |
||
| 89 | 89 | */ |
| 90 | 90 | public function get($attribute) |
| 91 | 91 | { |
| 92 | - list($attribute, $subattribute) = array_pad(explode('.', $attribute, 2), 2, null); |
|
| 92 | + list($attribute, $subattribute) = array_pad(explode('.', $attribute, 2), 2, null); |
|
| 93 | 93 | |
| 94 | 94 | if ($this->hasRelation($attribute)) { |
| 95 | 95 | $related = $this->related($attribute); |
@@ -155,9 +155,9 @@ discard block |
||
| 155 | 155 | $split = explode('\\', get_class($this)); |
| 156 | 156 | $class = end($split); |
| 157 | 157 | |
| 158 | - return preg_replace_callback('/([A-Z])/', function ($matches) { |
|
| 159 | - return '_' . strtolower($matches[1]); |
|
| 160 | - }, lcfirst($class)) . 's'; |
|
| 158 | + return preg_replace_callback('/([A-Z])/', function($matches) { |
|
| 159 | + return '_'.strtolower($matches[1]); |
|
| 160 | + }, lcfirst($class)).'s'; |
|
| 161 | 161 | } |
| 162 | 162 | |
| 163 | 163 | /** |
@@ -411,7 +411,7 @@ discard block |
||
| 411 | 411 | $storage = $instance->storage(); |
| 412 | 412 | |
| 413 | 413 | if (!$storage instanceof Searchable) { |
| 414 | - throw new Exception(get_class($instance) . ' storage is not searchable'); |
|
| 414 | + throw new Exception(get_class($instance).' storage is not searchable'); |
|
| 415 | 415 | } |
| 416 | 416 | |
| 417 | 417 | $attributes = $attributes ?: $instance->defaultSearchAttributes(); |
@@ -476,13 +476,13 @@ discard block |
||
| 476 | 476 | $storage = $instance->storage(); |
| 477 | 477 | |
| 478 | 478 | if (!$storage instanceof Queryable) { |
| 479 | - throw new Exception(get_class($instance) . ' storage is not queryable'); |
|
| 479 | + throw new Exception(get_class($instance).' storage is not queryable'); |
|
| 480 | 480 | } |
| 481 | 481 | |
| 482 | 482 | $query = new Query($instance->table()); |
| 483 | 483 | $builder = new Builder($query, $storage); |
| 484 | 484 | |
| 485 | - $builder->callback(function ($result) use ($instance) { |
|
| 485 | + $builder->callback(function($result) use ($instance) { |
|
| 486 | 486 | return $instance::hydrate($result->data); |
| 487 | 487 | }); |
| 488 | 488 | |
@@ -563,7 +563,7 @@ discard block |
||
| 563 | 563 | |
| 564 | 564 | // Storage must be modifiable in order to save |
| 565 | 565 | if (!$storage instanceof Modifiable) { |
| 566 | - throw new Exception($class . ' storage is not modifiable'); |
|
| 566 | + throw new Exception($class.' storage is not modifiable'); |
|
| 567 | 567 | } |
| 568 | 568 | |
| 569 | 569 | // Create or update the model in storage |
@@ -797,6 +797,6 @@ discard block |
||
| 797 | 797 | return $this->relation($method); |
| 798 | 798 | } |
| 799 | 799 | |
| 800 | - throw new Exception('Call to undefined method ' . get_class($this) . '::' . $method . '()'); |
|
| 800 | + throw new Exception('Call to undefined method '.get_class($this).'::'.$method.'()'); |
|
| 801 | 801 | } |
| 802 | 802 | } |