@@ -176,8 +176,9 @@ discard block |
||
176 | 176 | private function loadServiceProviders() |
177 | 177 | { |
178 | 178 | foreach ($this->bootstrapService->getProviders() as $provider) { |
179 | - if ($this->passedRegistrationCondition($provider)) |
|
180 | - $this->app->register($provider); |
|
179 | + if ($this->passedRegistrationCondition($provider)) { |
|
180 | + $this->app->register($provider); |
|
181 | + } |
|
181 | 182 | } |
182 | 183 | } |
183 | 184 | |
@@ -192,8 +193,9 @@ discard block |
||
192 | 193 | |
193 | 194 | private function passedRegistrationCondition($class) |
194 | 195 | { |
195 | - if (!class_implements_interface($class, ConditionalAutoRegistration::class)) |
|
196 | - return true; |
|
196 | + if (!class_implements_interface($class, ConditionalAutoRegistration::class)) { |
|
197 | + return true; |
|
198 | + } |
|
197 | 199 | return run_class_function($class, 'registrationCondition'); |
198 | 200 | } |
199 | 201 | } |
@@ -57,8 +57,9 @@ |
||
57 | 57 | |
58 | 58 | if ($modelId === null) { |
59 | 59 | $model = ($this->model)::where($index, $key)->first(); |
60 | - if ($model !== null) |
|
61 | - $this->store($model); |
|
60 | + if ($model !== null) { |
|
61 | + $this->store($model); |
|
62 | + } |
|
62 | 63 | return $model; |
63 | 64 | } |
64 | 65 |
@@ -42,8 +42,9 @@ discard block |
||
42 | 42 | { |
43 | 43 | if (!Schema::connection($this->connection)->hasTable($this->collection)) { |
44 | 44 | Schema::connection($this->connection)->create($this->collection, function (Blueprint $collection) { |
45 | - if (method_exists($this, 'migrate')) |
|
46 | - $this->migrate($collection); |
|
45 | + if (method_exists($this, 'migrate')) { |
|
46 | + $this->migrate($collection); |
|
47 | + } |
|
47 | 48 | }); |
48 | 49 | } |
49 | 50 | } |
@@ -56,8 +57,9 @@ discard block |
||
56 | 57 | final public function down() |
57 | 58 | { |
58 | 59 | if (Schema::connection($this->connection)->hasTable($this->collection)) { |
59 | - if (method_exists($this, 'destroy')) |
|
60 | - $this->destroy(); |
|
60 | + if (method_exists($this, 'destroy')) { |
|
61 | + $this->destroy(); |
|
62 | + } |
|
61 | 63 | Schema::connection($this->connection)->drop($this->collection); |
62 | 64 | } |
63 | 65 | } |