@@ -33,8 +33,8 @@ discard block |
||
33 | 33 | 'token' => env('AWS_SESSION_TOKEN'), |
34 | 34 | ], |
35 | 35 | 'region' => env('DYNAMODB_REGION'), |
36 | - // if true, it will use Laravel Log. |
|
37 | - // For advanced options, see http://docs.aws.amazon.com/aws-sdk-php/v3/guide/guide/configuration.html |
|
36 | + // if true, it will use Laravel Log. |
|
37 | + // For advanced options, see http://docs.aws.amazon.com/aws-sdk-php/v3/guide/guide/configuration.html |
|
38 | 38 | 'debug' => env('DYNAMODB_DEBUG'), |
39 | 39 | ], |
40 | 40 | 'aws_iam_role' => [ |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | 'secret' => 'secret', |
48 | 48 | ], |
49 | 49 | 'region' => 'stub', |
50 | - // see http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Tools.DynamoDBLocal.html |
|
50 | + // see http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Tools.DynamoDBLocal.html |
|
51 | 51 | 'endpoint' => env('DYNAMODB_LOCAL_ENDPOINT'), |
52 | 52 | 'debug' => true, |
53 | 53 | ], |
@@ -71,7 +71,7 @@ |
||
71 | 71 | protected function getDebugOptions($debug = false) |
72 | 72 | { |
73 | 73 | if ($debug === true) { |
74 | - $logfn = function ($msg) { |
|
74 | + $logfn = function($msg) { |
|
75 | 75 | Log::info($msg); |
76 | 76 | }; |
77 | 77 |
@@ -17,7 +17,7 @@ discard block |
||
17 | 17 | DynamoDbModel::setDynamoDbClientService($this->app->make(DynamoDbClientInterface::class)); |
18 | 18 | |
19 | 19 | $this->publishes([ |
20 | - __DIR__.'/../config/dynamodb.php' => app()->basePath('config/dynamodb.php'), |
|
20 | + __DIR__ . '/../config/dynamodb.php' => app()->basePath('config/dynamodb.php'), |
|
21 | 21 | ]); |
22 | 22 | } |
23 | 23 | |
@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | 'nullify_invalid' => true, |
31 | 31 | ]; |
32 | 32 | |
33 | - $this->app->singleton(DynamoDbClientInterface::class, function ($app) use ($marshalerOptions) { |
|
33 | + $this->app->singleton(DynamoDbClientInterface::class, function($app) use ($marshalerOptions) { |
|
34 | 34 | $client = new DynamoDbClientService(new Marshaler($marshalerOptions), new EmptyAttributeFilter()); |
35 | 35 | |
36 | 36 | return $client; |
@@ -463,7 +463,7 @@ discard block |
||
463 | 463 | if (count($result) == count(array_unique($id))) { |
464 | 464 | return $result; |
465 | 465 | } |
466 | - } elseif (! is_null($result)) { |
|
466 | + } elseif (!is_null($result)) { |
|
467 | 467 | return $result; |
468 | 468 | } |
469 | 469 | |
@@ -482,7 +482,7 @@ discard block |
||
482 | 482 | |
483 | 483 | public function firstOrFail($columns = []) |
484 | 484 | { |
485 | - if (! is_null($model = $this->first($columns))) { |
|
485 | + if (!is_null($model = $this->first($columns))) { |
|
486 | 486 | return $model; |
487 | 487 | } |
488 | 488 | |
@@ -757,7 +757,7 @@ discard block |
||
757 | 757 | $keys = collect($this->model->getKeyNames()); |
758 | 758 | |
759 | 759 | // could be ['id' => 'foo'], ['id1' => 'foo', 'id2' => 'bar'] |
760 | - $single = $keys->first(function ($name) use ($id) { |
|
760 | + $single = $keys->first(function($name) use ($id) { |
|
761 | 761 | return !isset($id[$name]); |
762 | 762 | }) === null; |
763 | 763 | |
@@ -816,7 +816,7 @@ discard block |
||
816 | 816 | */ |
817 | 817 | public function withoutGlobalScope($scope) |
818 | 818 | { |
819 | - if (! is_string($scope)) { |
|
819 | + if (!is_string($scope)) { |
|
820 | 820 | $scope = get_class($scope); |
821 | 821 | } |
822 | 822 | |
@@ -863,18 +863,18 @@ discard block |
||
863 | 863 | */ |
864 | 864 | public function applyScopes() |
865 | 865 | { |
866 | - if (! $this->scopes) { |
|
866 | + if (!$this->scopes) { |
|
867 | 867 | return $this; |
868 | 868 | } |
869 | 869 | |
870 | 870 | $builder = $this; |
871 | 871 | |
872 | 872 | foreach ($builder->scopes as $identifier => $scope) { |
873 | - if (! isset($builder->scopes[$identifier])) { |
|
873 | + if (!isset($builder->scopes[$identifier])) { |
|
874 | 874 | continue; |
875 | 875 | } |
876 | 876 | |
877 | - $builder->callScope(function (DynamoDbQueryBuilder $builder) use ($scope) { |
|
877 | + $builder->callScope(function(DynamoDbQueryBuilder $builder) use ($scope) { |
|
878 | 878 | // If the scope is a Closure we will just go ahead and call the scope with the |
879 | 879 | // builder instance. The "callScope" method will properly group the clauses |
880 | 880 | // that are added to this query so "where" clauses maintain proper logic. |
@@ -933,7 +933,7 @@ discard block |
||
933 | 933 | */ |
934 | 934 | public function __call($method, $parameters) |
935 | 935 | { |
936 | - if (method_exists($this->model, $scope = 'scope'.ucfirst($method))) { |
|
936 | + if (method_exists($this->model, $scope = 'scope' . ucfirst($method))) { |
|
937 | 937 | return $this->callScope([$this->model, $scope], $parameters); |
938 | 938 | } |
939 | 939 |
@@ -101,7 +101,7 @@ discard block |
||
101 | 101 | { |
102 | 102 | $keyConditions = $this->keyConditions() ?: []; |
103 | 103 | |
104 | - return array_filter($this->conditions, function ($condition) use ($keyConditions) { |
|
104 | + return array_filter($this->conditions, function($condition) use ($keyConditions) { |
|
105 | 105 | return array_search($condition, $keyConditions) === false; |
106 | 106 | }); |
107 | 107 | } |
@@ -143,7 +143,7 @@ discard block |
||
143 | 143 | */ |
144 | 144 | private function getCondition($column) |
145 | 145 | { |
146 | - return array_first($this->conditions, function ($condition) use ($column) { |
|
146 | + return array_first($this->conditions, function($condition) use ($column) { |
|
147 | 147 | return $condition['column'] === $column; |
148 | 148 | }); |
149 | 149 | } |
@@ -155,7 +155,7 @@ discard block |
||
155 | 155 | */ |
156 | 156 | private function getConditions($columns) |
157 | 157 | { |
158 | - return array_filter($this->conditions, function ($condition) use ($columns) { |
|
158 | + return array_filter($this->conditions, function($condition) use ($columns) { |
|
159 | 159 | return in_array($condition['column'], $columns); |
160 | 160 | }); |
161 | 161 | } |
@@ -121,7 +121,7 @@ discard block |
||
121 | 121 | return false; |
122 | 122 | } |
123 | 123 | |
124 | - if ($create && $this->fireModelEvent('creating') === false) { |
|
124 | + if ($create && $this->fireModelEvent('creating') === false) { |
|
125 | 125 | return false; |
126 | 126 | } |
127 | 127 | |
@@ -194,7 +194,7 @@ discard block |
||
194 | 194 | |
195 | 195 | public function refresh() |
196 | 196 | { |
197 | - if (! $this->exists) { |
|
197 | + if (!$this->exists) { |
|
198 | 198 | return $this; |
199 | 199 | } |
200 | 200 |