@@ -502,8 +502,8 @@ discard block |
||
| 502 | 502 | |
| 503 | 503 | $table = $this->model->getTable(); |
| 504 | 504 | |
| 505 | - $keys = collect($ids)->map(function ($id) { |
|
| 506 | - if (! is_array($id)) { |
|
| 505 | + $keys = collect($ids)->map(function($id) { |
|
| 506 | + if (!is_array($id)) { |
|
| 507 | 507 | $id = [$this->model->getKeyName() => $id]; |
| 508 | 508 | } |
| 509 | 509 | |
@@ -534,7 +534,7 @@ discard block |
||
| 534 | 534 | |
| 535 | 535 | public function firstOrNew(array $attributes, array $values = []) |
| 536 | 536 | { |
| 537 | - if (! is_null($instance = $this->where($attributes)->first())) { |
|
| 537 | + if (!is_null($instance = $this->where($attributes)->first())) { |
|
| 538 | 538 | return $instance; |
| 539 | 539 | } |
| 540 | 540 | |
@@ -543,7 +543,7 @@ discard block |
||
| 543 | 543 | |
| 544 | 544 | public function firstOrCreate(array $attributes, array $values = []) |
| 545 | 545 | { |
| 546 | - if (! is_null($instance = $this->where($attributes)->first())) { |
|
| 546 | + if (!is_null($instance = $this->where($attributes)->first())) { |
|
| 547 | 547 | return $instance; |
| 548 | 548 | } |
| 549 | 549 | |
@@ -567,7 +567,7 @@ discard block |
||
| 567 | 567 | if (count($result) == count(array_unique($id))) { |
| 568 | 568 | return $result; |
| 569 | 569 | } |
| 570 | - } elseif (! is_null($result)) { |
|
| 570 | + } elseif (!is_null($result)) { |
|
| 571 | 571 | return $result; |
| 572 | 572 | } |
| 573 | 573 | |
@@ -586,7 +586,7 @@ discard block |
||
| 586 | 586 | |
| 587 | 587 | public function firstOrFail($columns = []) |
| 588 | 588 | { |
| 589 | - if (! is_null($model = $this->first($columns))) { |
|
| 589 | + if (!is_null($model = $this->first($columns))) { |
|
| 590 | 590 | return $model; |
| 591 | 591 | } |
| 592 | 592 | |
@@ -771,7 +771,7 @@ discard block |
||
| 771 | 771 | $op = 'Scan'; |
| 772 | 772 | $queryBuilder = DynamoDb::table($this->model->getTable()); |
| 773 | 773 | |
| 774 | - if (! empty($this->wheres)) { |
|
| 774 | + if (!empty($this->wheres)) { |
|
| 775 | 775 | $analyzer = $this->getConditionAnalyzer(); |
| 776 | 776 | |
| 777 | 777 | if ($keyConditions = $analyzer->keyConditions()) { |
@@ -839,7 +839,7 @@ discard block |
||
| 839 | 839 | $keys = collect($this->model->getKeyNames()); |
| 840 | 840 | |
| 841 | 841 | // could be ['id' => 'foo'], ['id1' => 'foo', 'id2' => 'bar'] |
| 842 | - $single = $keys->first(function ($name) use ($id) { |
|
| 842 | + $single = $keys->first(function($name) use ($id) { |
|
| 843 | 843 | return !isset($id[$name]); |
| 844 | 844 | }) === null; |
| 845 | 845 | |
@@ -893,7 +893,7 @@ discard block |
||
| 893 | 893 | */ |
| 894 | 894 | public function withoutGlobalScope($scope) |
| 895 | 895 | { |
| 896 | - if (! is_string($scope)) { |
|
| 896 | + if (!is_string($scope)) { |
|
| 897 | 897 | $scope = get_class($scope); |
| 898 | 898 | } |
| 899 | 899 | |
@@ -940,18 +940,18 @@ discard block |
||
| 940 | 940 | */ |
| 941 | 941 | public function applyScopes() |
| 942 | 942 | { |
| 943 | - if (! $this->scopes) { |
|
| 943 | + if (!$this->scopes) { |
|
| 944 | 944 | return $this; |
| 945 | 945 | } |
| 946 | 946 | |
| 947 | 947 | $builder = $this; |
| 948 | 948 | |
| 949 | 949 | foreach ($builder->scopes as $identifier => $scope) { |
| 950 | - if (! isset($builder->scopes[$identifier])) { |
|
| 950 | + if (!isset($builder->scopes[$identifier])) { |
|
| 951 | 951 | continue; |
| 952 | 952 | } |
| 953 | 953 | |
| 954 | - $builder->callScope(function (DynamoDbQueryBuilder $builder) use ($scope) { |
|
| 954 | + $builder->callScope(function(DynamoDbQueryBuilder $builder) use ($scope) { |
|
| 955 | 955 | // If the scope is a Closure we will just go ahead and call the scope with the |
| 956 | 956 | // builder instance. The "callScope" method will properly group the clauses |
| 957 | 957 | // that are added to this query so "where" clauses maintain proper logic. |
@@ -1010,7 +1010,7 @@ discard block |
||
| 1010 | 1010 | */ |
| 1011 | 1011 | public function __call($method, $parameters) |
| 1012 | 1012 | { |
| 1013 | - if (method_exists($this->model, $scope = 'scope'.ucfirst($method))) { |
|
| 1013 | + if (method_exists($this->model, $scope = 'scope' . ucfirst($method))) { |
|
| 1014 | 1014 | return $this->callScope([$this->model, $scope], $parameters); |
| 1015 | 1015 | } |
| 1016 | 1016 | |