@@ -100,7 +100,7 @@ discard block |
||
100 | 100 | * @uses self::$Timezone |
101 | 101 | * @uses PDO |
102 | 102 | */ |
103 | - public static function getConnection($label=null) |
|
103 | + public static function getConnection($label = null) |
|
104 | 104 | { |
105 | 105 | if (!$label) { |
106 | 106 | $label = static::getDefaultLabel(); |
@@ -116,10 +116,10 @@ discard block |
||
116 | 116 | |
117 | 117 | if (isset($config['socket'])) { |
118 | 118 | // socket connection |
119 | - $DSN = 'mysql:unix_socket=' . $config['socket'] . ';dbname=' . $config['database']; |
|
119 | + $DSN = 'mysql:unix_socket='.$config['socket'].';dbname='.$config['database']; |
|
120 | 120 | } else { |
121 | 121 | // tcp connection |
122 | - $DSN = 'mysql:host=' . $config['host'] . ';port=' . $config['port'] .';dbname=' . $config['database']; |
|
122 | + $DSN = 'mysql:host='.$config['host'].';port='.$config['port'].';dbname='.$config['database']; |
|
123 | 123 | } |
124 | 124 | |
125 | 125 | try { |
@@ -147,7 +147,7 @@ discard block |
||
147 | 147 | { |
148 | 148 | if (is_string($data)) { |
149 | 149 | $data = static::getConnection()->quote($data); |
150 | - $data = substr($data, 1, strlen($data)-2); |
|
150 | + $data = substr($data, 1, strlen($data) - 2); |
|
151 | 151 | return $data; |
152 | 152 | } elseif (is_array($data)) { |
153 | 153 | foreach ($data as $key=>$string) { |
@@ -391,7 +391,7 @@ discard block |
||
391 | 391 | $error = static::getConnection()->errorInfo(); |
392 | 392 | $message = $error[2]; |
393 | 393 | |
394 | - if (App::$Config['environment']=='dev') { |
|
394 | + if (App::$Config['environment'] == 'dev') { |
|
395 | 395 | $Handler = \Divergence\App::$whoops->popHandler(); |
396 | 396 | |
397 | 397 | $Handler->addDataTable("Query Information", [ |
@@ -431,7 +431,7 @@ discard block |
||
431 | 431 | |
432 | 432 | protected static function startQueryLog($query) |
433 | 433 | { |
434 | - if (App::$Config['environment']!='dev') { |
|
434 | + if (App::$Config['environment'] != 'dev') { |
|
435 | 435 | return false; |
436 | 436 | } |
437 | 437 |