Completed
Branch raw-query (b7467f)
by Bao
12:24 queued 06:02
created
config/dynamodb.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -33,8 +33,8 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
         ],
Please login to merge, or discard this patch.
src/DynamoDbClientService.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -71,7 +71,7 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/ConditionAnalyzer/Analyzer.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
     }
Please login to merge, or discard this patch.
src/DynamoDbModel.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/DynamoDbQueryBuilder.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -464,7 +464,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/RawDynamoDbQuery.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/DynamoDbServiceProvider.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
     }
Please login to merge, or discard this patch.