@@ -10,9 +10,9 @@ |
||
10 | 10 | |
11 | 11 | class ModelManager implements ModelManagerContract |
12 | 12 | { |
13 | - /** |
|
14 | - * @var Application |
|
15 | - */ |
|
13 | + /** |
|
14 | + * @var Application |
|
15 | + */ |
|
16 | 16 | private $app; |
17 | 17 | |
18 | 18 | /** |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | { |
35 | 35 | $modelInstance = $this->app->make($modelName); |
36 | 36 | |
37 | - if (! $modelInstance instanceof EloquentModel) { |
|
37 | + if (!$modelInstance instanceof EloquentModel) { |
|
38 | 38 | $message = "Target [$modelName] is not an Illuminate\Database\Eloquent\Model instance."; |
39 | 39 | |
40 | 40 | throw new \Exception($message); |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | if ($modelInstance instanceof HasCustomRepository) { |
56 | 56 | $repository = $this->app->make($modelInstance->repository(), $args); |
57 | 57 | |
58 | - if (! $repository instanceof Repository) { |
|
58 | + if (!$repository instanceof Repository) { |
|
59 | 59 | $message = "The [$modelName] custom repository must extend ANavallaSuiza\Laravel\Database\Repository\Eloquent\Repository."; |
60 | 60 | |
61 | 61 | throw new \Exception($message); |
@@ -30,7 +30,7 @@ |
||
30 | 30 | { |
31 | 31 | $this->mergeConfigFrom(__DIR__.'/../../config/laravel-database.php', 'laravel-database'); |
32 | 32 | |
33 | - $this->app->bind('ANavallaSuiza\Laravel\Database\Contracts\Manager\ModelManager', function ($app) { |
|
33 | + $this->app->bind('ANavallaSuiza\Laravel\Database\Contracts\Manager\ModelManager', function($app) { |
|
34 | 34 | return new ModelManager($app); |
35 | 35 | }); |
36 | 36 |
@@ -45,7 +45,7 @@ |
||
45 | 45 | { |
46 | 46 | $columns = $this->getTableColumns(); |
47 | 47 | |
48 | - if (! array_key_exists($name, $columns)) { |
|
48 | + if (!array_key_exists($name, $columns)) { |
|
49 | 49 | throw new \Exception("Column ".$name." not found on ".$this->model->getTable()); |
50 | 50 | } |
51 | 51 |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | */ |
54 | 54 | public function __call($method, $params) |
55 | 55 | { |
56 | - if (! method_exists($this->repository, $method)) { |
|
56 | + if (!method_exists($this->repository, $method)) { |
|
57 | 57 | throw new RepositoryException("Method $method not found on repository"); |
58 | 58 | } |
59 | 59 | |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | $lifetime = $this->lifetime; |
79 | 79 | unset($this->lifetime); |
80 | 80 | |
81 | - return $this->cache->remember($key, $lifetime, function () use ($method, $params) { |
|
81 | + return $this->cache->remember($key, $lifetime, function() use ($method, $params) { |
|
82 | 82 | return call_user_func_array(array($this->repository, $method), $params); |
83 | 83 | }); |
84 | 84 | } |
@@ -216,7 +216,7 @@ |
||
216 | 216 | */ |
217 | 217 | protected function refresh() |
218 | 218 | { |
219 | - if (! $this->model instanceof EloquentModel) { |
|
219 | + if (!$this->model instanceof EloquentModel) { |
|
220 | 220 | $this->model = $this->model->getModel(); |
221 | 221 | } |
222 | 222 |
@@ -84,7 +84,7 @@ |
||
84 | 84 | } |
85 | 85 | |
86 | 86 | if ($this->option('force')) { |
87 | - DB::transaction(function () use ($diffStatements) { |
|
87 | + DB::transaction(function() use ($diffStatements) { |
|
88 | 88 | foreach ($diffStatements as $statement) { |
89 | 89 | DB::statement($statement); |
90 | 90 | } |