@@ -102,7 +102,7 @@ discard block |
||
102 | 102 | * @uses self::$Timezone |
103 | 103 | * @uses PDO |
104 | 104 | */ |
105 | - public static function getConnection($label=null) |
|
105 | + public static function getConnection($label = null) |
|
106 | 106 | { |
107 | 107 | if (!$label) { |
108 | 108 | $label = static::getDefaultLabel(); |
@@ -118,10 +118,10 @@ discard block |
||
118 | 118 | |
119 | 119 | if (isset($config['socket'])) { |
120 | 120 | // socket connection |
121 | - $DSN = 'mysql:unix_socket=' . $config['socket'] . ';dbname=' . $config['database']; |
|
121 | + $DSN = 'mysql:unix_socket='.$config['socket'].';dbname='.$config['database']; |
|
122 | 122 | } else { |
123 | 123 | // tcp connection |
124 | - $DSN = 'mysql:host=' . $config['host'] . ';port=' . $config['port'] .';dbname=' . $config['database']; |
|
124 | + $DSN = 'mysql:host='.$config['host'].';port='.$config['port'].';dbname='.$config['database']; |
|
125 | 125 | } |
126 | 126 | |
127 | 127 | try { |
@@ -149,7 +149,7 @@ discard block |
||
149 | 149 | { |
150 | 150 | if (is_string($data)) { |
151 | 151 | $data = static::getConnection()->quote($data); |
152 | - $data = substr($data, 1, strlen($data)-2); |
|
152 | + $data = substr($data, 1, strlen($data) - 2); |
|
153 | 153 | return $data; |
154 | 154 | } elseif (is_array($data)) { |
155 | 155 | foreach ($data as $key=>$string) { |
@@ -488,7 +488,7 @@ discard block |
||
488 | 488 | $error = static::getConnection()->errorInfo(); |
489 | 489 | $message = $error[2]; |
490 | 490 | |
491 | - if (App::$Config['environment']=='dev') { |
|
491 | + if (App::$Config['environment'] == 'dev') { |
|
492 | 492 | $Handler = \Divergence\App::$whoops->popHandler(); |
493 | 493 | |
494 | 494 | $Handler->addDataTable("Query Information", [ |
@@ -533,7 +533,7 @@ discard block |
||
533 | 533 | */ |
534 | 534 | protected static function startQueryLog($query) |
535 | 535 | { |
536 | - if (App::$Config['environment']!='dev') { |
|
536 | + if (App::$Config['environment'] != 'dev') { |
|
537 | 537 | return false; |
538 | 538 | } |
539 | 539 |