@@ -21,7 +21,7 @@ |
||
21 | 21 | */ |
22 | 22 | public function transform($value, $type = '') |
23 | 23 | { |
24 | - $method = 'transform' . ucfirst($type); |
|
24 | + $method = 'transform'.ucfirst($type); |
|
25 | 25 | |
26 | 26 | if (method_exists($this, $method)) { |
27 | 27 | return $this->$method($value); |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | */ |
92 | 92 | public function get($attribute) |
93 | 93 | { |
94 | - list($attribute, $subattribute) = array_pad(explode('.', $attribute, 2), 2, null); |
|
94 | + list($attribute, $subattribute) = array_pad(explode('.', $attribute, 2), 2, null); |
|
95 | 95 | |
96 | 96 | if ($this->hasRelation($attribute)) { |
97 | 97 | $related = $this->related($attribute); |
@@ -157,9 +157,9 @@ discard block |
||
157 | 157 | $split = explode('\\', get_class($this)); |
158 | 158 | $class = end($split); |
159 | 159 | |
160 | - return preg_replace_callback('/([A-Z])/', function ($matches) { |
|
161 | - return '_' . strtolower($matches[1]); |
|
162 | - }, lcfirst($class)) . 's'; |
|
160 | + return preg_replace_callback('/([A-Z])/', function($matches) { |
|
161 | + return '_'.strtolower($matches[1]); |
|
162 | + }, lcfirst($class)).'s'; |
|
163 | 163 | } |
164 | 164 | |
165 | 165 | /** |
@@ -413,7 +413,7 @@ discard block |
||
413 | 413 | $storage = $instance->storage(); |
414 | 414 | |
415 | 415 | if (!$storage instanceof Searchable) { |
416 | - throw new Exception(get_class($instance) . ' storage is not searchable'); |
|
416 | + throw new Exception(get_class($instance).' storage is not searchable'); |
|
417 | 417 | } |
418 | 418 | |
419 | 419 | $attributes = $attributes ?: $instance->defaultSearchAttributes(); |
@@ -478,13 +478,13 @@ discard block |
||
478 | 478 | $storage = $instance->storage(); |
479 | 479 | |
480 | 480 | if (!$storage instanceof Queryable) { |
481 | - throw new Exception(get_class($instance) . ' storage is not queryable'); |
|
481 | + throw new Exception(get_class($instance).' storage is not queryable'); |
|
482 | 482 | } |
483 | 483 | |
484 | 484 | $query = new Query($instance->table()); |
485 | 485 | $builder = new Builder($query, $storage); |
486 | 486 | |
487 | - $builder->callback(function ($result) use ($instance) { |
|
487 | + $builder->callback(function($result) use ($instance) { |
|
488 | 488 | return $instance::hydrate($result->data); |
489 | 489 | }); |
490 | 490 | |
@@ -565,7 +565,7 @@ discard block |
||
565 | 565 | |
566 | 566 | // Storage must be modifiable in order to save |
567 | 567 | if (!$storage instanceof Modifiable) { |
568 | - throw new Exception($class . ' storage is not modifiable'); |
|
568 | + throw new Exception($class.' storage is not modifiable'); |
|
569 | 569 | } |
570 | 570 | |
571 | 571 | // Create or update the model in storage |