@@ -464,7 +464,7 @@ discard block |
||
| 464 | 464 | if (count($result) == count(array_unique($id))) { |
| 465 | 465 | return $result; |
| 466 | 466 | } |
| 467 | - } elseif (! is_null($result)) { |
|
| 467 | + } elseif (!is_null($result)) { |
|
| 468 | 468 | return $result; |
| 469 | 469 | } |
| 470 | 470 | |
@@ -483,7 +483,7 @@ discard block |
||
| 483 | 483 | |
| 484 | 484 | public function firstOrFail($columns = []) |
| 485 | 485 | { |
| 486 | - if (! is_null($model = $this->first($columns))) { |
|
| 486 | + if (!is_null($model = $this->first($columns))) { |
|
| 487 | 487 | return $model; |
| 488 | 488 | } |
| 489 | 489 | |
@@ -638,7 +638,7 @@ discard block |
||
| 638 | 638 | $op = 'Scan'; |
| 639 | 639 | $queryBuilder = DynamoDb::table($this->model->getTable()); |
| 640 | 640 | |
| 641 | - if (! empty($this->wheres)) { |
|
| 641 | + if (!empty($this->wheres)) { |
|
| 642 | 642 | $analyzer = $this->getConditionAnalyzer(); |
| 643 | 643 | |
| 644 | 644 | if ($keyConditions = $analyzer->keyConditions()) { |
@@ -740,7 +740,7 @@ discard block |
||
| 740 | 740 | $keys = collect($this->model->getKeyNames()); |
| 741 | 741 | |
| 742 | 742 | // could be ['id' => 'foo'], ['id1' => 'foo', 'id2' => 'bar'] |
| 743 | - $single = $keys->first(function ($name) use ($id) { |
|
| 743 | + $single = $keys->first(function($name) use ($id) { |
|
| 744 | 744 | return !isset($id[$name]); |
| 745 | 745 | }) === null; |
| 746 | 746 | |
@@ -794,7 +794,7 @@ discard block |
||
| 794 | 794 | */ |
| 795 | 795 | public function withoutGlobalScope($scope) |
| 796 | 796 | { |
| 797 | - if (! is_string($scope)) { |
|
| 797 | + if (!is_string($scope)) { |
|
| 798 | 798 | $scope = get_class($scope); |
| 799 | 799 | } |
| 800 | 800 | |
@@ -841,18 +841,18 @@ discard block |
||
| 841 | 841 | */ |
| 842 | 842 | public function applyScopes() |
| 843 | 843 | { |
| 844 | - if (! $this->scopes) { |
|
| 844 | + if (!$this->scopes) { |
|
| 845 | 845 | return $this; |
| 846 | 846 | } |
| 847 | 847 | |
| 848 | 848 | $builder = $this; |
| 849 | 849 | |
| 850 | 850 | foreach ($builder->scopes as $identifier => $scope) { |
| 851 | - if (! isset($builder->scopes[$identifier])) { |
|
| 851 | + if (!isset($builder->scopes[$identifier])) { |
|
| 852 | 852 | continue; |
| 853 | 853 | } |
| 854 | 854 | |
| 855 | - $builder->callScope(function (DynamoDbQueryBuilder $builder) use ($scope) { |
|
| 855 | + $builder->callScope(function(DynamoDbQueryBuilder $builder) use ($scope) { |
|
| 856 | 856 | // If the scope is a Closure we will just go ahead and call the scope with the |
| 857 | 857 | // builder instance. The "callScope" method will properly group the clauses |
| 858 | 858 | // that are added to this query so "where" clauses maintain proper logic. |
@@ -911,7 +911,7 @@ discard block |
||
| 911 | 911 | */ |
| 912 | 912 | public function __call($method, $parameters) |
| 913 | 913 | { |
| 914 | - if (method_exists($this->model, $scope = 'scope'.ucfirst($method))) { |
|
| 914 | + if (method_exists($this->model, $scope = 'scope' . ucfirst($method))) { |
|
| 915 | 915 | return $this->callScope([$this->model, $scope], $parameters); |
| 916 | 916 | } |
| 917 | 917 | |
@@ -37,7 +37,7 @@ |
||
| 37 | 37 | */ |
| 38 | 38 | public function finalize() |
| 39 | 39 | { |
| 40 | - $this->query = array_filter($this->query, function ($value) { |
|
| 40 | + $this->query = array_filter($this->query, function($value) { |
|
| 41 | 41 | return !empty($value) || is_bool($value) || is_numeric($value); |
| 42 | 42 | }); |
| 43 | 43 | |
@@ -18,7 +18,7 @@ discard block |
||
| 18 | 18 | DynamoDbModel::setDynamoDbClientService($this->app->make(DynamoDbClientInterface::class)); |
| 19 | 19 | |
| 20 | 20 | $this->publishes([ |
| 21 | - __DIR__.'/../config/dynamodb.php' => app()->basePath('config/dynamodb.php'), |
|
| 21 | + __DIR__ . '/../config/dynamodb.php' => app()->basePath('config/dynamodb.php'), |
|
| 22 | 22 | ]); |
| 23 | 23 | } |
| 24 | 24 | |
@@ -31,13 +31,13 @@ discard block |
||
| 31 | 31 | 'nullify_invalid' => true, |
| 32 | 32 | ]; |
| 33 | 33 | |
| 34 | - $this->app->singleton(DynamoDbClientInterface::class, function () use ($marshalerOptions) { |
|
| 34 | + $this->app->singleton(DynamoDbClientInterface::class, function() use ($marshalerOptions) { |
|
| 35 | 35 | $client = new DynamoDbClientService(new Marshaler($marshalerOptions), new EmptyAttributeFilter()); |
| 36 | 36 | |
| 37 | 37 | return $client; |
| 38 | 38 | }); |
| 39 | 39 | |
| 40 | - $this->app->singleton('dynamodb', function () { |
|
| 40 | + $this->app->singleton('dynamodb', function() { |
|
| 41 | 41 | return new DynamoDbManager(app(DynamoDbClientInterface::class)); |
| 42 | 42 | }); |
| 43 | 43 | } |