Completed
Pull Request — master (#142)
by Bao
06:40
created
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.
src/DynamoDbQueryBuilder.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -474,8 +474,8 @@  discard block
 block discarded – undo
474 474
 
475 475
         $table = $this->model->getTable();
476 476
 
477
-        $keys = collect($ids)->map(function ($id) {
478
-            if (! is_array($id)) {
477
+        $keys = collect($ids)->map(function($id) {
478
+            if (!is_array($id)) {
479 479
                 $id = [$this->model->getKeyName() => $id];
480 480
             }
481 481
 
@@ -512,7 +512,7 @@  discard block
 block discarded – undo
512 512
             if (count($result) == count(array_unique($id))) {
513 513
                 return $result;
514 514
             }
515
-        } elseif (! is_null($result)) {
515
+        } elseif (!is_null($result)) {
516 516
             return $result;
517 517
         }
518 518
 
@@ -531,7 +531,7 @@  discard block
 block discarded – undo
531 531
 
532 532
     public function firstOrFail($columns = [])
533 533
     {
534
-        if (! is_null($model = $this->first($columns))) {
534
+        if (!is_null($model = $this->first($columns))) {
535 535
             return $model;
536 536
         }
537 537
 
@@ -686,7 +686,7 @@  discard block
 block discarded – undo
686 686
         $op = 'Scan';
687 687
         $queryBuilder = DynamoDb::table($this->model->getTable());
688 688
 
689
-        if (! empty($this->wheres)) {
689
+        if (!empty($this->wheres)) {
690 690
             $analyzer = $this->getConditionAnalyzer();
691 691
 
692 692
             if ($keyConditions = $analyzer->keyConditions()) {
@@ -788,7 +788,7 @@  discard block
 block discarded – undo
788 788
         $keys = collect($this->model->getKeyNames());
789 789
 
790 790
         // could be ['id' => 'foo'], ['id1' => 'foo', 'id2' => 'bar']
791
-        $single = $keys->first(function ($name) use ($id) {
791
+        $single = $keys->first(function($name) use ($id) {
792 792
             return !isset($id[$name]);
793 793
         }) === null;
794 794
 
@@ -842,7 +842,7 @@  discard block
 block discarded – undo
842 842
      */
843 843
     public function withoutGlobalScope($scope)
844 844
     {
845
-        if (! is_string($scope)) {
845
+        if (!is_string($scope)) {
846 846
             $scope = get_class($scope);
847 847
         }
848 848
 
@@ -889,18 +889,18 @@  discard block
 block discarded – undo
889 889
      */
890 890
     public function applyScopes()
891 891
     {
892
-        if (! $this->scopes) {
892
+        if (!$this->scopes) {
893 893
             return $this;
894 894
         }
895 895
 
896 896
         $builder = $this;
897 897
 
898 898
         foreach ($builder->scopes as $identifier => $scope) {
899
-            if (! isset($builder->scopes[$identifier])) {
899
+            if (!isset($builder->scopes[$identifier])) {
900 900
                 continue;
901 901
             }
902 902
 
903
-            $builder->callScope(function (DynamoDbQueryBuilder $builder) use ($scope) {
903
+            $builder->callScope(function(DynamoDbQueryBuilder $builder) use ($scope) {
904 904
                 // If the scope is a Closure we will just go ahead and call the scope with the
905 905
                 // builder instance. The "callScope" method will properly group the clauses
906 906
                 // that are added to this query so "where" clauses maintain proper logic.
@@ -959,7 +959,7 @@  discard block
 block discarded – undo
959 959
      */
960 960
     public function __call($method, $parameters)
961 961
     {
962
-        if (method_exists($this->model, $scope = 'scope'.ucfirst($method))) {
962
+        if (method_exists($this->model, $scope = 'scope' . ucfirst($method))) {
963 963
             return $this->callScope([$this->model, $scope], $parameters);
964 964
         }
965 965
 
Please login to merge, or discard this patch.