@@ -25,7 +25,7 @@ discard block |
||
| 25 | 25 | $fields = $reads; |
| 26 | 26 | } else { |
| 27 | 27 | $field = []; |
| 28 | - $prefix = strlen($table) ?"`{$table}`." :''; |
|
| 28 | + $prefix = strlen($table) ? "`{$table}`." : ''; |
|
| 29 | 29 | foreach ($reads as $want) { |
| 30 | 30 | $field[] = $prefix."`$want`"; |
| 31 | 31 | } |
@@ -102,7 +102,7 @@ discard block |
||
| 102 | 102 | { |
| 103 | 103 | list($inSQL, $binders) = $this->prepareInParameter($values, $name); |
| 104 | 104 | $sql = '`'.$name.'` IN ('.$inSQL.')'; |
| 105 | - return [$sql,$binders]; |
|
| 105 | + return [$sql, $binders]; |
|
| 106 | 106 | } |
| 107 | 107 | |
| 108 | 108 | /** |
@@ -154,7 +154,7 @@ discard block |
||
| 154 | 154 | protected function prepareQueryMark(string $sql, array $parameter) |
| 155 | 155 | { |
| 156 | 156 | $binders = []; |
| 157 | - $query = preg_replace_callback('/\?/', function ($match) use (&$binders, $parameter) { |
|
| 157 | + $query = preg_replace_callback('/\?/', function($match) use (&$binders, $parameter) { |
|
| 158 | 158 | $index = count($binders); |
| 159 | 159 | if (array_key_exists($index, $parameter)) { |
| 160 | 160 | $name = Binder::index($index); |
@@ -183,7 +183,7 @@ discard block |
||
| 183 | 183 | protected function mergeBinder(array $binderArray, array $parameter) |
| 184 | 184 | { |
| 185 | 185 | foreach ($parameter as $key => $value) { |
| 186 | - if (! ($value instanceof Binder)) { |
|
| 186 | + if (!($value instanceof Binder)) { |
|
| 187 | 187 | $value = new Binder($key, $value); |
| 188 | 188 | } |
| 189 | 189 | if (!in_array($value, $binderArray)) { |
@@ -104,7 +104,7 @@ discard block |
||
| 104 | 104 | if (array_key_exists('server-port', $this->request->server())) { |
| 105 | 105 | return $this->request->server()['server-port']; |
| 106 | 106 | } |
| 107 | - return $this->getSecure()?443:80; |
|
| 107 | + return $this->getSecure() ? 443 : 80; |
|
| 108 | 108 | } |
| 109 | 109 | |
| 110 | 110 | /** |
@@ -148,7 +148,7 @@ discard block |
||
| 148 | 148 | */ |
| 149 | 149 | public static function createUriBase(RequestWrapper $request) |
| 150 | 150 | { |
| 151 | - $scheme = $request->isSecure()?'https':'http'; |
|
| 151 | + $scheme = $request->isSecure() ? 'https' : 'http'; |
|
| 152 | 152 | $port = $request->getPort(); |
| 153 | 153 | if ($port == 80 && $scheme == 'http') { |
| 154 | 154 | $port = ''; |
@@ -157,7 +157,7 @@ discard block |
||
| 157 | 157 | } else { |
| 158 | 158 | $port = ':'.$port; |
| 159 | 159 | } |
| 160 | - $base = $scheme.'://'. $request->getHost().$port; |
|
| 160 | + $base = $scheme.'://'.$request->getHost().$port; |
|
| 161 | 161 | return $base; |
| 162 | 162 | } |
| 163 | 163 | } |