Passed
Branch dev (f56f10)
by Wilmer
04:41 queued 01:34
created
src/TestSupport/TestConnectionTrait.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
 
72 72
         $this->expectException(Exception::class);
73 73
 
74
-        $db->transaction(function () use ($db) {
74
+        $db->transaction(function() use ($db) {
75 75
             $db->createCommand()->insert('profile', ['description' => 'test transaction shortcut'])->execute();
76 76
             throw new Exception('Exception in transaction shortcut');
77 77
         });
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
     {
86 86
         $db = $this->getConnection(true);
87 87
 
88
-        $result = $db->transaction(static function () use ($db) {
88
+        $result = $db->transaction(static function() use ($db) {
89 89
             $db->createCommand()->insert('profile', ['description' => 'test transaction shortcut'])->execute();
90 90
             return true;
91 91
         });
@@ -108,10 +108,10 @@  discard block
 block discarded – undo
108 108
     {
109 109
         $db = $this->getConnection();
110 110
 
111
-        $db->transaction(function (ConnectionInterface $db) {
111
+        $db->transaction(function(ConnectionInterface $db) {
112 112
             $this->assertNotNull($db->getTransaction());
113 113
 
114
-            $db->transaction(function (ConnectionInterface $db) {
114
+            $db->transaction(function(ConnectionInterface $db) {
115 115
                 $this->assertNotNull($db->getTransaction());
116 116
                 $db->getTransaction()->rollBack();
117 117
             });
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
 
127 127
         $db->setEnableSavepoint(false);
128 128
 
129
-        $db->transaction(function (ConnectionInterface $db) {
129
+        $db->transaction(function(ConnectionInterface $db) {
130 130
             $this->assertNotNull($db->getTransaction());
131 131
             $this->expectException(NotSupportedException::class);
132 132
             $db->beginTransaction();
Please login to merge, or discard this patch.
src/TestSupport/TestCommandTrait.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -232,7 +232,7 @@  discard block
 block discarded – undo
232 232
      */
233 233
     public function testBatchInsertWithYield(): void
234 234
     {
235
-        $rows = (static function () {
235
+        $rows = (static function() {
236 236
             if (false) {
237 237
                 yield [];
238 238
             }
@@ -791,14 +791,14 @@  discard block
 block discarded – undo
791 791
         $update->bindValues([':id' => 1, ':name' => 'user11'])->execute();
792 792
         $this->assertEquals('user11', $command->bindValue(':id', 1)->queryScalar());
793 793
 
794
-        $db->cache(function (ConnectionInterface $db) use ($command, $update) {
794
+        $db->cache(function(ConnectionInterface $db) use ($command, $update) {
795 795
             $this->assertEquals('user2', $command->bindValue(':id', 2)->queryScalar());
796 796
 
797 797
             $update->bindValues([':id' => 2, ':name' => 'user22'])->execute();
798 798
 
799 799
             $this->assertEquals('user2', $command->bindValue(':id', 2)->queryScalar());
800 800
 
801
-            $db->noCache(function () use ($command) {
801
+            $db->noCache(function() use ($command) {
802 802
                 $this->assertEquals('user22', $command->bindValue(':id', 2)->queryScalar());
803 803
             });
804 804
 
@@ -807,7 +807,7 @@  discard block
 block discarded – undo
807 807
 
808 808
         $this->queryCache->setEnable(false);
809 809
 
810
-        $db->cache(function () use ($command, $update) {
810
+        $db->cache(function() use ($command, $update) {
811 811
             $this->assertEquals('user22', $command->bindValue(':id', 2)->queryScalar());
812 812
             $update->bindValues([':id' => 2, ':name' => 'user2'])->execute();
813 813
             $this->assertEquals('user2', $command->bindValue(':id', 2)->queryScalar());
@@ -823,7 +823,7 @@  discard block
 block discarded – undo
823 823
 
824 824
         $command = $db->createCommand('SELECT [[name]] FROM {{customer}} WHERE [[id]] = :id');
825 825
 
826
-        $db->cache(function () use ($command) {
826
+        $db->cache(function() use ($command) {
827 827
             $this->assertEquals('user11', $command->bindValue(':id', 1)->queryScalar());
828 828
             $this->assertEquals('user1', $command->noCache()->bindValue(':id', 1)->queryScalar());
829 829
         }, 10);
@@ -897,7 +897,7 @@  discard block
 block discarded – undo
897 897
         $this->invokeMethod(
898 898
             $command,
899 899
             'setRetryHandler',
900
-            [static function ($exception, $attempt) use (&$attempts, &$hitHandler) {
900
+            [static function($exception, $attempt) use (&$attempts, &$hitHandler) {
901 901
                 $attempts = $attempt;
902 902
                 $hitHandler = true;
903 903
 
Please login to merge, or discard this patch.
src/TestSupport/TestQueryTrait.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -550,7 +550,7 @@  discard block
 block discarded – undo
550 550
         $result = (new Query($db))->from('customer')
551 551
             ->select(['name', 'id'])
552 552
             ->orderBy(['id' => SORT_DESC])
553
-            ->indexBy(function ($row) {
553
+            ->indexBy(function($row) {
554 554
                 return $row['id'] * 2;
555 555
             })
556 556
             ->column();
@@ -814,7 +814,7 @@  discard block
 block discarded – undo
814 814
         );
815 815
 
816 816
         /* Connection cache */
817
-        $db->cache(function (ConnectionInterface $db) use ($query, $update) {
817
+        $db->cache(function(ConnectionInterface $db) use ($query, $update) {
818 818
             $this->assertEquals(
819 819
                 'user2',
820 820
                 $query->where(['id' => 2])->scalar(),
@@ -829,7 +829,7 @@  discard block
 block discarded – undo
829 829
                 'Query does NOT reflect DB changes when wrapped in connection caching'
830 830
             );
831 831
 
832
-            $db->noCache(function () use ($query) {
832
+            $db->noCache(function() use ($query) {
833 833
                 $this->assertEquals(
834 834
                     'user22',
835 835
                     $query->where(['id' => 2])->scalar(),
@@ -846,7 +846,7 @@  discard block
 block discarded – undo
846 846
 
847 847
         $this->queryCache->setEnable(false);
848 848
 
849
-        $db->cache(function () use ($query, $update) {
849
+        $db->cache(function() use ($query, $update) {
850 850
             $this->assertEquals(
851 851
                 'user22',
852 852
                 $query->where(['id' => 2])->scalar(),
@@ -877,7 +877,7 @@  discard block
 block discarded – undo
877 877
             'When Query has disabled cache, we get actual data'
878 878
         );
879 879
 
880
-        $db->cache(function () use ($query) {
880
+        $db->cache(function() use ($query) {
881 881
             $this->assertEquals('user1', $query->noCache()->where(['id' => 1])->scalar());
882 882
             $this->assertEquals('user11', $query->cache()->where(['id' => 1])->scalar());
883 883
         }, 10);
Please login to merge, or discard this patch.
src/TestSupport/IsOneOfAssert.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@
 block discarded – undo
30 30
      */
31 31
     public function toString(): string
32 32
     {
33
-        $allowedValues = array_map(static function ($value) {
33
+        $allowedValues = array_map(static function($value) {
34 34
             return VarDumper::create($value)->asString();
35 35
         }, $this->allowedValues);
36 36
 
Please login to merge, or discard this patch.
src/Schema/Schema.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -489,7 +489,7 @@  discard block
 block discarded – undo
489 489
      */
490 490
     protected function loadTableTypeMetadata(string $type, string $name): Constraint|array|TableSchema|null
491 491
     {
492
-        return match ($type) {
492
+        return match($type) {
493 493
             self::SCHEMA => $this->loadTableSchema($name),
494 494
             self::PRIMARY_KEY => $this->loadTablePrimaryKey($name),
495 495
             self::UNIQUES => $this->loadTableUniques($name),
@@ -515,7 +515,7 @@  discard block
 block discarded – undo
515 515
         string $name,
516 516
         bool $refresh = false
517 517
     ): Constraint|array|null|TableSchema {
518
-        return match ($type) {
518
+        return match($type) {
519 519
             self::SCHEMA => $this->getTableSchema($name, $refresh),
520 520
             self::PRIMARY_KEY => $this->getTablePrimaryKey($name, $refresh),
521 521
             self::UNIQUES => $this->getTableUniques($name, $refresh),
Please login to merge, or discard this patch.