@@ -105,7 +105,7 @@ discard block |
||
105 | 105 | */ |
106 | 106 | public static function observeSaveAndCascade() |
107 | 107 | { |
108 | - $onSave = function ($model) { |
|
108 | + $onSave = function($model) { |
|
109 | 109 | |
110 | 110 | /* |
111 | 111 | * Remove any keys not present in the collection |
@@ -143,7 +143,7 @@ discard block |
||
143 | 143 | */ |
144 | 144 | public static function observeDeleteAndCascade() |
145 | 145 | { |
146 | - $onDelete = function ($model) { |
|
146 | + $onDelete = function($model) { |
|
147 | 147 | foreach ($model->meta as $meta) { |
148 | 148 | $meta->delete(); |
149 | 149 | } |
@@ -47,7 +47,7 @@ |
||
47 | 47 | */ |
48 | 48 | public function registerTypeRegistry() |
49 | 49 | { |
50 | - $this->app->singleton(TypeRegistry::class, function () { |
|
50 | + $this->app->singleton(TypeRegistry::class, function() { |
|
51 | 51 | $registry = new TypeRegistry; |
52 | 52 | |
53 | 53 | $this->registerDefaultTypes($registry); |
@@ -91,7 +91,7 @@ |
||
91 | 91 | */ |
92 | 92 | public function setValueAttribute($value, $type = null) |
93 | 93 | { |
94 | - if (is_null($type) && ! isset($this->attributes['type'])) { |
|
94 | + if (is_null($type) && !isset($this->attributes['type'])) { |
|
95 | 95 | $registry = $this->getTypeRegistry(); |
96 | 96 | $this->attributes['type'] = $registry->findTypeFor($value)->getClass(); |
97 | 97 | } |
@@ -40,7 +40,7 @@ |
||
40 | 40 | |
41 | 41 | protected function registerClass($class, $instance) |
42 | 42 | { |
43 | - if (! isset($this->registered[$class])) { |
|
43 | + if (!isset($this->registered[$class])) { |
|
44 | 44 | $this->registered[$class] = $instance; |
45 | 45 | |
46 | 46 | return true; |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | */ |
63 | 63 | protected function setTags(array $items) |
64 | 64 | { |
65 | - array_map(function ($item) { |
|
65 | + array_map(function($item) { |
|
66 | 66 | if ($item instanceof MetaItemContract) { |
67 | 67 | $item->tag = $item->tag ?: $this->default_tag; |
68 | 68 | } |
@@ -109,7 +109,7 @@ discard block |
||
109 | 109 | public function add($item) |
110 | 110 | { |
111 | 111 | if ($item instanceof MetaItemContract) { |
112 | - if (! is_null($this->findItem($item->key, $item->tag))) { |
|
112 | + if (!is_null($this->findItem($item->key, $item->tag))) { |
|
113 | 113 | $tag = $item->tag ?: $this->default_tag; |
114 | 114 | |
115 | 115 | $key = $item->key; |
@@ -136,7 +136,7 @@ discard block |
||
136 | 136 | { |
137 | 137 | $collection = $this->whereKey($key); |
138 | 138 | |
139 | - if (! is_null($tag)) { |
|
139 | + if (!is_null($tag)) { |
|
140 | 140 | $collection = $collection->whereTag($tag); |
141 | 141 | } |
142 | 142 | |
@@ -166,10 +166,10 @@ discard block |
||
166 | 166 | */ |
167 | 167 | protected function observeDeletion(MetaItemContract $item) |
168 | 168 | { |
169 | - $item::deleted(function ($model) { |
|
169 | + $item::deleted(function($model) { |
|
170 | 170 | $key = $this->findItem($model->key, $model->tag); |
171 | 171 | |
172 | - if (! is_null($key)) { |
|
172 | + if (!is_null($key)) { |
|
173 | 173 | $this->forget($key); |
174 | 174 | } |
175 | 175 | }); |
@@ -250,7 +250,7 @@ discard block |
||
250 | 250 | */ |
251 | 251 | public function __isset($name) |
252 | 252 | { |
253 | - return ! is_null($this->findItem($name, $this->default_tag)); |
|
253 | + return !is_null($this->findItem($name, $this->default_tag)); |
|
254 | 254 | } |
255 | 255 | |
256 | 256 | /** |
@@ -262,7 +262,7 @@ discard block |
||
262 | 262 | { |
263 | 263 | $key = $this->findItem($name, $this->default_tag); |
264 | 264 | |
265 | - if (! is_null($key)) { |
|
265 | + if (!is_null($key)) { |
|
266 | 266 | $this->forget($key); |
267 | 267 | } |
268 | 268 | } |
@@ -278,7 +278,7 @@ discard block |
||
278 | 278 | { |
279 | 279 | $key = $this->findItem($name, $this->default_tag); |
280 | 280 | |
281 | - if (! is_null($key)) { |
|
281 | + if (!is_null($key)) { |
|
282 | 282 | return $this->get($key)->value; |
283 | 283 | } |
284 | 284 | |
@@ -300,7 +300,7 @@ discard block |
||
300 | 300 | { |
301 | 301 | $key = $this->findItem($name, $this->default_tag); |
302 | 302 | |
303 | - if (! is_null($key)) { |
|
303 | + if (!is_null($key)) { |
|
304 | 304 | $this->get($key)->value = $value; |
305 | 305 | } else { |
306 | 306 | $attr = [ |
@@ -30,7 +30,7 @@ |
||
30 | 30 | */ |
31 | 31 | protected function getClassColumns($class) |
32 | 32 | { |
33 | - if (! isset(static::$model_table_columns[$class])) { |
|
33 | + if (!isset(static::$model_table_columns[$class])) { |
|
34 | 34 | static::$model_table_columns[$class] = $this->getConnection() |
35 | 35 | ->getSchemaBuilder() |
36 | 36 | ->getColumnListing($this->getTable()); |