@@ -428,7 +428,7 @@ discard block |
||
| 428 | 428 | $results = $this->getAll([], $chunkSize, false); |
| 429 | 429 | |
| 430 | 430 | if ($results->isNotEmpty()) { |
| 431 | - if(call_user_func($callback, $results) === false) { |
|
| 431 | + if (call_user_func($callback, $results) === false) { |
|
| 432 | 432 | return false; |
| 433 | 433 | } |
| 434 | 434 | } |
@@ -500,8 +500,8 @@ discard block |
||
| 500 | 500 | |
| 501 | 501 | $table = $this->model->getTable(); |
| 502 | 502 | |
| 503 | - $keys = collect($ids)->map(function ($id) { |
|
| 504 | - if (! is_array($id)) { |
|
| 503 | + $keys = collect($ids)->map(function($id) { |
|
| 504 | + if (!is_array($id)) { |
|
| 505 | 505 | $id = [$this->model->getKeyName() => $id]; |
| 506 | 506 | } |
| 507 | 507 | |
@@ -538,7 +538,7 @@ discard block |
||
| 538 | 538 | if (count($result) == count(array_unique($id))) { |
| 539 | 539 | return $result; |
| 540 | 540 | } |
| 541 | - } elseif (! is_null($result)) { |
|
| 541 | + } elseif (!is_null($result)) { |
|
| 542 | 542 | return $result; |
| 543 | 543 | } |
| 544 | 544 | |
@@ -557,7 +557,7 @@ discard block |
||
| 557 | 557 | |
| 558 | 558 | public function firstOrFail($columns = []) |
| 559 | 559 | { |
| 560 | - if (! is_null($model = $this->first($columns))) { |
|
| 560 | + if (!is_null($model = $this->first($columns))) { |
|
| 561 | 561 | return $model; |
| 562 | 562 | } |
| 563 | 563 | |
@@ -742,7 +742,7 @@ discard block |
||
| 742 | 742 | $op = 'Scan'; |
| 743 | 743 | $queryBuilder = DynamoDb::table($this->model->getTable()); |
| 744 | 744 | |
| 745 | - if (! empty($this->wheres)) { |
|
| 745 | + if (!empty($this->wheres)) { |
|
| 746 | 746 | $analyzer = $this->getConditionAnalyzer(); |
| 747 | 747 | |
| 748 | 748 | if ($keyConditions = $analyzer->keyConditions()) { |
@@ -810,7 +810,7 @@ discard block |
||
| 810 | 810 | $keys = collect($this->model->getKeyNames()); |
| 811 | 811 | |
| 812 | 812 | // could be ['id' => 'foo'], ['id1' => 'foo', 'id2' => 'bar'] |
| 813 | - $single = $keys->first(function ($name) use ($id) { |
|
| 813 | + $single = $keys->first(function($name) use ($id) { |
|
| 814 | 814 | return !isset($id[$name]); |
| 815 | 815 | }) === null; |
| 816 | 816 | |
@@ -864,7 +864,7 @@ discard block |
||
| 864 | 864 | */ |
| 865 | 865 | public function withoutGlobalScope($scope) |
| 866 | 866 | { |
| 867 | - if (! is_string($scope)) { |
|
| 867 | + if (!is_string($scope)) { |
|
| 868 | 868 | $scope = get_class($scope); |
| 869 | 869 | } |
| 870 | 870 | |
@@ -911,18 +911,18 @@ discard block |
||
| 911 | 911 | */ |
| 912 | 912 | public function applyScopes() |
| 913 | 913 | { |
| 914 | - if (! $this->scopes) { |
|
| 914 | + if (!$this->scopes) { |
|
| 915 | 915 | return $this; |
| 916 | 916 | } |
| 917 | 917 | |
| 918 | 918 | $builder = $this; |
| 919 | 919 | |
| 920 | 920 | foreach ($builder->scopes as $identifier => $scope) { |
| 921 | - if (! isset($builder->scopes[$identifier])) { |
|
| 921 | + if (!isset($builder->scopes[$identifier])) { |
|
| 922 | 922 | continue; |
| 923 | 923 | } |
| 924 | 924 | |
| 925 | - $builder->callScope(function (DynamoDbQueryBuilder $builder) use ($scope) { |
|
| 925 | + $builder->callScope(function(DynamoDbQueryBuilder $builder) use ($scope) { |
|
| 926 | 926 | // If the scope is a Closure we will just go ahead and call the scope with the |
| 927 | 927 | // builder instance. The "callScope" method will properly group the clauses |
| 928 | 928 | // that are added to this query so "where" clauses maintain proper logic. |
@@ -981,7 +981,7 @@ discard block |
||
| 981 | 981 | */ |
| 982 | 982 | public function __call($method, $parameters) |
| 983 | 983 | { |
| 984 | - if (method_exists($this->model, $scope = 'scope'.ucfirst($method))) { |
|
| 984 | + if (method_exists($this->model, $scope = 'scope' . ucfirst($method))) { |
|
| 985 | 985 | return $this->callScope([$this->model, $scope], $parameters); |
| 986 | 986 | } |
| 987 | 987 | |