Completed
Push — master ( e2468c...a5594e )
by Henry
03:26
created
src/IO/Database/MySQL.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
      * @param string $label
100 100
      * @return void
101 101
      */
102
-    public static function setConnection(string $label=null)
102
+    public static function setConnection(string $label = null)
103 103
     {
104 104
         if ($label === null && static::$currentConnection === null) {
105 105
             static::$currentConnection = static::getDefaultLabel();
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
      * @uses static::$Timezone
133 133
      * @uses PDO
134 134
      */
135
-    public static function getConnection($label=null)
135
+    public static function getConnection($label = null)
136 136
     {
137 137
         if ($label === null) {
138 138
             if (static::$currentConnection === null) {
@@ -151,10 +151,10 @@  discard block
 block discarded – undo
151 151
 
152 152
             if (isset($config['socket'])) {
153 153
                 // socket connection
154
-                $DSN = 'mysql:unix_socket=' . $config['socket'] . ';dbname=' . $config['database'];
154
+                $DSN = 'mysql:unix_socket='.$config['socket'].';dbname='.$config['database'];
155 155
             } else {
156 156
                 // tcp connection
157
-                $DSN = 'mysql:host=' . $config['host'] . ';port=' . $config['port'] .';dbname=' . $config['database'];
157
+                $DSN = 'mysql:host='.$config['host'].';port='.$config['port'].';dbname='.$config['database'];
158 158
             }
159 159
 
160 160
             try {
@@ -182,7 +182,7 @@  discard block
 block discarded – undo
182 182
     {
183 183
         if (is_string($data)) {
184 184
             $data = static::getConnection()->quote($data);
185
-            $data = substr($data, 1, strlen($data)-2);
185
+            $data = substr($data, 1, strlen($data) - 2);
186 186
             return $data;
187 187
         } elseif (is_array($data)) {
188 188
             foreach ($data as $key=>$string) {
@@ -521,7 +521,7 @@  discard block
 block discarded – undo
521 521
         $error = static::getConnection()->errorInfo();
522 522
         $message = $error[2];
523 523
 
524
-        if (App::$Config['environment']=='dev') {
524
+        if (App::$Config['environment'] == 'dev') {
525 525
             $Handler = \Divergence\App::$whoops->popHandler();
526 526
 
527 527
             $Handler->addDataTable("Query Information", [
@@ -566,7 +566,7 @@  discard block
 block discarded – undo
566 566
      */
567 567
     protected static function startQueryLog($query)
568 568
     {
569
-        if (App::$Config['environment']!='dev') {
569
+        if (App::$Config['environment'] != 'dev') {
570 570
             return false;
571 571
         }
572 572
 
Please login to merge, or discard this patch.