Completed
Pull Request — master (#1)
by
unknown
08:32
created
examples/transaction_example.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@
 block discarded – undo
34 34
 });
35 35
 
36 36
 $db->beginTransaction()
37
- ->then(function (TransactionInterface $trans) use ($loop) {
37
+    ->then(function (TransactionInterface $trans) use ($loop) {
38 38
     $trans->query('select * from demo order by id desc limit 1')
39 39
     ->then(function (TupleResultStatement $tuple) {
40 40
         print_r($tuple->fetchAll());
Please login to merge, or discard this patch.
src/PgSQL/Connection/Connector.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -45,11 +45,11 @@
 block discarded – undo
45 45
         $promise = $this->conn->getPromise();
46 46
 
47 47
         return $promise
48
-               ->success(function (ConnectorInterface $connector) use ($connection) {
49
-                   $connection->setConnector($connector);
48
+                ->success(function (ConnectorInterface $connector) use ($connection) {
49
+                    $connection->setConnector($connector);
50 50
 
51
-                   return $connection;
52
-               });
51
+                    return $connection;
52
+                });
53 53
     }
54 54
 
55 55
     public function connect()
Please login to merge, or discard this patch.
src/PgSQL/Transaction/Transaction.php 1 patch
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -78,13 +78,13 @@  discard block
 block discarded – undo
78 78
      */
79 79
     public function commit()
80 80
     {
81
-       return $this->connector->execute('COMMIT')->success(function (CommandResultStatement $result) {
82
-           if ($result) {
83
-               $this->emitter->emit('transaction:end');
84
-           }
81
+        return $this->connector->execute('COMMIT')->success(function (CommandResultStatement $result) {
82
+            if ($result) {
83
+                $this->emitter->emit('transaction:end');
84
+            }
85 85
 
86
-           return $result;
87
-       });
86
+            return $result;
87
+        });
88 88
     }
89 89
 
90 90
     /**
@@ -93,12 +93,12 @@  discard block
 block discarded – undo
93 93
      */
94 94
     public function rollback()
95 95
     {
96
-       return $this->connector->execute('ROLLBACK')->success(function (CommandResultStatement $result) {
97
-           if ($result) {
98
-               $this->emitter->emit('transaction:end');    
99
-           }
96
+        return $this->connector->execute('ROLLBACK')->success(function (CommandResultStatement $result) {
97
+            if ($result) {
98
+                $this->emitter->emit('transaction:end');    
99
+            }
100 100
 
101
-           return $result;
102
-       });
101
+            return $result;
102
+        });
103 103
     }
104 104
 }
Please login to merge, or discard this patch.