@@ -503,8 +503,8 @@ discard block |
||
503 | 503 | |
504 | 504 | $table = $this->model->getTable(); |
505 | 505 | |
506 | - $keys = collect($ids)->map(function ($id) { |
|
507 | - if (! is_array($id)) { |
|
506 | + $keys = collect($ids)->map(function($id) { |
|
507 | + if (!is_array($id)) { |
|
508 | 508 | $id = [$this->model->getKeyName() => $id]; |
509 | 509 | } |
510 | 510 | |
@@ -541,7 +541,7 @@ discard block |
||
541 | 541 | if (count($result) == count(array_unique($id))) { |
542 | 542 | return $result; |
543 | 543 | } |
544 | - } elseif (! is_null($result)) { |
|
544 | + } elseif (!is_null($result)) { |
|
545 | 545 | return $result; |
546 | 546 | } |
547 | 547 | |
@@ -560,7 +560,7 @@ discard block |
||
560 | 560 | |
561 | 561 | public function firstOrFail($columns = []) |
562 | 562 | { |
563 | - if (! is_null($model = $this->first($columns))) { |
|
563 | + if (!is_null($model = $this->first($columns))) { |
|
564 | 564 | return $model; |
565 | 565 | } |
566 | 566 | |
@@ -690,7 +690,7 @@ discard block |
||
690 | 690 | } |
691 | 691 | $this->lastEvaluatedKey = Arr::get($res, 'LastEvaluatedKey'); |
692 | 692 | |
693 | - return (object)['count' => $res['Count'], 'scanned_count' => $res['ScannedCount'], 'lastKey' => $this->lastEvaluatedKey]; |
|
693 | + return (object) ['count' => $res['Count'], 'scanned_count' => $res['ScannedCount'], 'lastKey' => $this->lastEvaluatedKey]; |
|
694 | 694 | } |
695 | 695 | |
696 | 696 | public function decorate(Closure $closure) |
@@ -761,7 +761,7 @@ discard block |
||
761 | 761 | $op = 'Scan'; |
762 | 762 | $queryBuilder = DynamoDb::table($this->model->getTable()); |
763 | 763 | |
764 | - if (! empty($this->wheres)) { |
|
764 | + if (!empty($this->wheres)) { |
|
765 | 765 | $analyzer = $this->getConditionAnalyzer(); |
766 | 766 | |
767 | 767 | if ($keyConditions = $analyzer->keyConditions()) { |
@@ -829,7 +829,7 @@ discard block |
||
829 | 829 | $keys = collect($this->model->getKeyNames()); |
830 | 830 | |
831 | 831 | // could be ['id' => 'foo'], ['id1' => 'foo', 'id2' => 'bar'] |
832 | - $single = $keys->first(function ($name) use ($id) { |
|
832 | + $single = $keys->first(function($name) use ($id) { |
|
833 | 833 | return !isset($id[$name]); |
834 | 834 | }) === null; |
835 | 835 | |
@@ -883,7 +883,7 @@ discard block |
||
883 | 883 | */ |
884 | 884 | public function withoutGlobalScope($scope) |
885 | 885 | { |
886 | - if (! is_string($scope)) { |
|
886 | + if (!is_string($scope)) { |
|
887 | 887 | $scope = get_class($scope); |
888 | 888 | } |
889 | 889 | |
@@ -930,18 +930,18 @@ discard block |
||
930 | 930 | */ |
931 | 931 | public function applyScopes() |
932 | 932 | { |
933 | - if (! $this->scopes) { |
|
933 | + if (!$this->scopes) { |
|
934 | 934 | return $this; |
935 | 935 | } |
936 | 936 | |
937 | 937 | $builder = $this; |
938 | 938 | |
939 | 939 | foreach ($builder->scopes as $identifier => $scope) { |
940 | - if (! isset($builder->scopes[$identifier])) { |
|
940 | + if (!isset($builder->scopes[$identifier])) { |
|
941 | 941 | continue; |
942 | 942 | } |
943 | 943 | |
944 | - $builder->callScope(function (DynamoDbQueryBuilder $builder) use ($scope) { |
|
944 | + $builder->callScope(function(DynamoDbQueryBuilder $builder) use ($scope) { |
|
945 | 945 | // If the scope is a Closure we will just go ahead and call the scope with the |
946 | 946 | // builder instance. The "callScope" method will properly group the clauses |
947 | 947 | // that are added to this query so "where" clauses maintain proper logic. |
@@ -1000,7 +1000,7 @@ discard block |
||
1000 | 1000 | */ |
1001 | 1001 | public function __call($method, $parameters) |
1002 | 1002 | { |
1003 | - if (method_exists($this->model, $scope = 'scope'.ucfirst($method))) { |
|
1003 | + if (method_exists($this->model, $scope = 'scope' . ucfirst($method))) { |
|
1004 | 1004 | return $this->callScope([$this->model, $scope], $parameters); |
1005 | 1005 | } |
1006 | 1006 |