Passed
Push — master ( 439e54...d87366 )
by Daniel
02:41
created
source/CommonCode.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
             return $this->setArrayToJson($aReturn);
58 58
         }
59 59
         $aReturn = $this->getContentFromUrlThroughCurlRawArray($fullURL, $features);
60
-        return '{ ' . $this->packIntoJson($aReturn, 'info') . ', ' . $this->packIntoJson($aReturn, 'response') . ' }';
60
+        return '{ '.$this->packIntoJson($aReturn, 'info').', '.$this->packIntoJson($aReturn, 'response').' }';
61 61
     }
62 62
 
63 63
     /**
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
             return '<div>No MySQL connection detected</div>';
118 118
         }
119 119
         $afRows = $this->mySQLconnection->affected_rows;
120
-        return '<div>' . sprintf($this->lclMsgCmnNumber('i18n_Record', 'i18n_Records', $afRows), $afRows) . '</div>';
120
+        return '<div>'.sprintf($this->lclMsgCmnNumber('i18n_Record', 'i18n_Records', $afRows), $afRows).'</div>';
121 121
     }
122 122
 
123 123
     /**
@@ -189,9 +189,9 @@  discard block
 block discarded – undo
189 189
     private function packIntoJson($aReturn, $keyToWorkWith)
190 190
     {
191 191
         if ($this->isJsonByDanielGP($aReturn[$keyToWorkWith])) {
192
-            return '"' . $keyToWorkWith . '": ' . $aReturn[$keyToWorkWith];
192
+            return '"'.$keyToWorkWith.'": '.$aReturn[$keyToWorkWith];
193 193
         }
194
-        return '"' . $keyToWorkWith . '": {' . $aReturn[$keyToWorkWith] . ' }';
194
+        return '"'.$keyToWorkWith.'": {'.$aReturn[$keyToWorkWith].' }';
195 195
     }
196 196
 
197 197
     /**
@@ -205,7 +205,7 @@  discard block
 block discarded – undo
205 205
     {
206 206
         $postingUrl = filter_var($urlToSendTo, FILTER_VALIDATE_URL);
207 207
         if ($postingUrl === false) {
208
-            throw new \Exception('Invalid URL in ' . __FUNCTION__);
208
+            throw new \Exception('Invalid URL in '.__FUNCTION__);
209 209
         }
210 210
         if (is_array($params)) {
211 211
             $cntFailErrMsg = $this->lclMsgCmn('i18n_Error_FailedToConnect');
@@ -225,7 +225,7 @@  discard block
 block discarded – undo
225 225
         }
226 226
         $flPointer = fsockopen($pUrlParts['host'], $postingPort, $erN, $erM, 30);
227 227
         if ($flPointer === false) {
228
-            throw new \Exception($cntFailErrMsg . ': ' . $erN . ' (' . $erM . ')');
228
+            throw new \Exception($cntFailErrMsg.': '.$erN.' ('.$erM.')');
229 229
         }
230 230
         fwrite($flPointer, $this->sendBackgroundPrepareData($pUrlParts, $postingString));
231 231
         fclose($flPointer);
@@ -235,12 +235,12 @@  discard block
 block discarded – undo
235 235
     {
236 236
         $this->initializeSprGlbAndSession();
237 237
         $out   = [];
238
-        $out[] = 'POST ' . $pUrlParts['path'] . ' ' . $this->tCmnSuperGlobals->server->get['SERVER_PROTOCOL'];
239
-        $out[] = 'Host: ' . $pUrlParts['host'];
240
-        $out[] = 'User-Agent: ' . $this->getUserAgentByCommonLib();
238
+        $out[] = 'POST '.$pUrlParts['path'].' '.$this->tCmnSuperGlobals->server->get['SERVER_PROTOCOL'];
239
+        $out[] = 'Host: '.$pUrlParts['host'];
240
+        $out[] = 'User-Agent: '.$this->getUserAgentByCommonLib();
241 241
         $out[] = 'Content-Type: application/x-www-form-urlencoded';
242
-        $out[] = 'Content-Length: ' . strlen($postingString);
243
-        $out[] = 'Connection: Close' . "\r\n";
242
+        $out[] = 'Content-Length: '.strlen($postingString);
243
+        $out[] = 'Connection: Close'."\r\n";
244 244
         $out[] = $postingString;
245 245
         return implode("\r\n", $out);
246 246
     }
Please login to merge, or discard this patch.
source/CommonViews.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -52,8 +52,8 @@  discard block
 block discarded – undo
52 52
         if ($dtl['COLUMN_NAME'] == 'host') {
53 53
             $inVl = gethostbyaddr($this->tCmnRequest->server->get('REMOTE_ADDR'));
54 54
             return [
55
-                'label' => '<label for="' . $dtl['COLUMN_NAME'] . '">Numele calculatorului</label>',
56
-                'input' => '<input type="text" name="host" size="15" readonly value="' . $inVl . '" />',
55
+                'label' => '<label for="'.$dtl['COLUMN_NAME'].'">Numele calculatorului</label>',
56
+                'input' => '<input type="text" name="host" size="15" readonly value="'.$inVl.'" />',
57 57
             ];
58 58
         }
59 59
         $result = $this->setFieldInput($tableSource, $dtl, $features);
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
     {
73 73
         if ($dtl['COLUMN_NAME'] == 'ChoiceId') {
74 74
             return '<input type="text" name="ChoiceId" value="'
75
-                    . $this->tCmnRequest->request->get($dtl['COLUMN_NAME']) . '" />';
75
+                    . $this->tCmnRequest->request->get($dtl['COLUMN_NAME']).'" />';
76 76
         }
77 77
         return $this->setNeededFieldByType($tableSource, $dtl, $features);
78 78
     }
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
             }
101 101
         }
102 102
         $frmFtrs = ['id' => $feat['id'], 'action' => $feat['action'], 'method' => $feat['method']];
103
-        return $this->setStringIntoTag(implode('', $sReturn) . $this->setFormButtons($feat, $hdnInf), 'form', $frmFtrs)
103
+        return $this->setStringIntoTag(implode('', $sReturn).$this->setFormButtons($feat, $hdnInf), 'form', $frmFtrs)
104 104
                 . $this->setFormJavascriptFinal($feat['id']);
105 105
     }
106 106
 
@@ -147,10 +147,10 @@  discard block
 block discarded – undo
147 147
     {
148 148
         $sReturn = $this->setField($tableSource, $details, $features, $fieldLabel);
149 149
         $lmts    = $this->setFieldNumbers($details);
150
-        return '<div>' . $sReturn['label']
150
+        return '<div>'.$sReturn['label']
151 151
                 . $this->setStringIntoTag($sReturn['input'], 'span', ['class' => 'labell'])
152 152
                 . '<span style="font-size:x-small;font-style:italic;">&nbsp;(max. '
153
-                . $lmts['M'] . (isset($lmts['d']) ? ' w. ' . $lmts['d'] . ' decimals' : '') . ')</span>'
153
+                . $lmts['M'].(isset($lmts['d']) ? ' w. '.$lmts['d'].' decimals' : '').')</span>'
154 154
                 . '</div>';
155 155
     }
156 156
 
@@ -176,7 +176,7 @@  discard block
 block discarded – undo
176 176
             '$(this).remove();',
177 177
             '});',
178 178
         ]));
179
-        return '<div id="DeleteFeedback">' . $sReturn . '</div>' . $finalJavascript;
179
+        return '<div id="DeleteFeedback">'.$sReturn.'</div>'.$finalJavascript;
180 180
     }
181 181
 
182 182
     /**
@@ -196,7 +196,7 @@  discard block
 block discarded – undo
196 196
             $idFldVal = $this->tCmnSuperGlobals->query->get($idn);
197 197
             $this->setMySQLquery2Server($this->sQueryToDeleteSingleIdentifier([$tbl, $idn, $idFldVal]));
198 198
             $sReturn  = $this->setFeedbackModern('error', $tMsg['Confirmation'], $tMsg['Failed'])
199
-                    . '(' . $this->mySQLconnection->error . ')';
199
+                    . '('.$this->mySQLconnection->error.')';
200 200
             if ($this->mySQLconnection->affected_rows > 0) {
201 201
                 $sReturn = $this->setFeedbackModern('check', $tMsg['Confirmation'], $tMsg['Success']);
202 202
             }
Please login to merge, or discard this patch.
source/MySQLiAdvancedOutput.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
      */
66 66
     protected function getFieldNameForDisplay($details)
67 67
     {
68
-        $tableUniqueId = $details['TABLE_SCHEMA'] . '.' . $details['TABLE_NAME'];
68
+        $tableUniqueId = $details['TABLE_SCHEMA'].'.'.$details['TABLE_NAME'];
69 69
         if ($details['COLUMN_COMMENT'] != '') {
70 70
             return $details['COLUMN_COMMENT'];
71 71
         } elseif (isset($this->advCache['tableStructureLocales'][$tableUniqueId][$details['COLUMN_NAME']])) {
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
         }
96 96
         $vlSlct    = explode(',', $this->getFieldValue($val));
97 97
         $slctOptns = $this->getSetOrEnum2Array($tblSrc, $val['COLUMN_NAME']);
98
-        return $this->setArrayToSelect($slctOptns, $vlSlct, $val['COLUMN_NAME'] . $adnlThings['suffix'], $inAdtnl);
98
+        return $this->setArrayToSelect($slctOptns, $vlSlct, $val['COLUMN_NAME'].$adnlThings['suffix'], $inAdtnl);
99 99
     }
100 100
 
101 101
     /**
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
         if ($iar !== []) {
142 142
             $inAdtnl = array_merge($inAdtnl, $iar);
143 143
         }
144
-        return '<b>' . $this->getFieldValue($value) . '</b>' . $this->setStringIntoShortTag('input', $inAdtnl);
144
+        return '<b>'.$this->getFieldValue($value).'</b>'.$this->setStringIntoShortTag('input', $inAdtnl);
145 145
     }
146 146
 
147 147
     /**
@@ -154,8 +154,8 @@  discard block
 block discarded – undo
154 154
      */
155 155
     private function getFieldOutputNumericNonFK($fkArray, $value, $iar = [])
156 156
     {
157
-        $query         = $this->sQueryGenericSelectKeyValue([
158
-            '`' . $value['COLUMN_NAME'] . '`',
157
+        $query = $this->sQueryGenericSelectKeyValue([
158
+            '`'.$value['COLUMN_NAME'].'`',
159 159
             $fkArray[$value['COLUMN_NAME']][2],
160 160
             $fkArray[$value['COLUMN_NAME']][0],
161 161
         ]);
@@ -296,7 +296,7 @@  discard block
 block discarded – undo
296 296
                 if ($val[$cnm[0]] == $oCol) {
297 297
                     $vlQ        = array_merge($val, ['LIMIT' => 2]);
298 298
                     $tFd        = $this->setMySQLquery2Server($this->getForeignKeysQuery($vlQ), $cnm[1])['result'];
299
-                    $tgtFld     = '`' . ($tFd[0][$cnm[0]] == $val[$cnm[0]] ? $tFd[1][$cnm[0]] : $tFd[0][$cnm[0]]) . '`';
299
+                    $tgtFld     = '`'.($tFd[0][$cnm[0]] == $val[$cnm[0]] ? $tFd[1][$cnm[0]] : $tFd[0][$cnm[0]]).'`';
300 300
                     $aRt[$oCol] = [$this->glueDbTb($val[$cnm[2]], $val[$cnm[3]]), $val[$cnm[2]], $tgtFld];
301 301
                 }
302 302
             }
@@ -347,7 +347,7 @@  discard block
 block discarded – undo
347 347
                 $inM = $this->setStringIntoTag($mCN[$dtl['COLUMN_NAME']], 'span', ['style' => 'font-style:italic;']);
348 348
             }
349 349
         }
350
-        $lbl = '<span class="fake_label">' . $this->getFieldNameForDisplay($dtl) . '</span>';
350
+        $lbl = '<span class="fake_label">'.$this->getFieldNameForDisplay($dtl).'</span>';
351 351
         return ['label' => $lbl, 'input' => $inM];
352 352
     }
353 353
 
@@ -363,7 +363,7 @@  discard block
 block discarded – undo
363 363
         } elseif (in_array($dtls['DATA_TYPE'], ['date', 'datetime', 'time', 'timestamp', 'year'])) {
364 364
             $sReturn = $this->setNeededFieldSingleType($tblName, $dtls, $iar);
365 365
         }
366
-        return $this->getFieldCompletionType($dtls) . $sReturn;
366
+        return $this->getFieldCompletionType($dtls).$sReturn;
367 367
     }
368 368
 
369 369
     private function setNeededFieldSingleType($tblName, $dtls, $iar)
Please login to merge, or discard this patch.
source/MySQLiMultipleExecution.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
      */
124 124
     protected function glueDbTb($dbName, $tbName)
125 125
     {
126
-        return '`' . $dbName . '`.`' . $tbName . '`';
126
+        return '`'.$dbName.'`.`'.$tbName.'`';
127 127
     }
128 128
 
129 129
     /**
@@ -154,7 +154,7 @@  discard block
 block discarded – undo
154 154
      */
155 155
     private function handleFeaturesSingle($fieldName, $features, $featureKey)
156 156
     {
157
-        $fMap    = [
157
+        $fMap = [
158 158
             'readonly' => ['readonly', 'class', 'input_readonly'],
159 159
             'disabled' => ['disabled']
160 160
         ];
Please login to merge, or discard this patch.
source/CommonBasic.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -73,14 +73,14 @@  discard block
 block discarded – undo
73 73
             'File Group'             => $info->getGroup(),
74 74
             'File Inode'             => $info->getInode(),
75 75
             'File Link Target'       => ($info->isLink() ? $info->getLinkTarget() : '-'),
76
-            'File Name'              => $info->getBasename('.' . $info->getExtension()),
76
+            'File Name'              => $info->getBasename('.'.$info->getExtension()),
77 77
             'File Name w. Extension' => $info->getFilename(),
78 78
             'File Owner'             => $info->getOwner(),
79 79
             'File Path'              => $info->getPath(),
80 80
             'Name'                   => $info->getRealPath(),
81 81
             'Type'                   => $info->getType(),
82 82
         ];
83
-        $aDetails          = array_merge($aFileBasicDetails, $this->getFileDetailsRawStatistic($info, $fileGiven));
83
+        $aDetails = array_merge($aFileBasicDetails, $this->getFileDetailsRawStatistic($info, $fileGiven));
84 84
         ksort($aDetails);
85 85
         return $aDetails;
86 86
     }
@@ -127,8 +127,8 @@  discard block
 block discarded – undo
127 127
         $sFiles     = [];
128 128
         foreach ($iterator as $file) {
129 129
             $relativePathFile = str_replace($sourcePath, '', $file->getRealPath());
130
-            if (!file_exists($targetPath . $relativePathFile)) {
131
-                $sFiles[$relativePathFile] = $targetPath . $relativePathFile;
130
+            if (!file_exists($targetPath.$relativePathFile)) {
131
+                $sFiles[$relativePathFile] = $targetPath.$relativePathFile;
132 132
             }
133 133
         }
134 134
         return $this->setArrayToJson($sFiles);
Please login to merge, or discard this patch.
source/MySQLiByDanielGP.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -88,11 +88,11 @@  discard block
 block discarded – undo
88 88
             'size'      => 10,
89 89
             'maxlength' => 10,
90 90
             'onfocus'   => implode('', [
91
-                'javascript:NewCssCal(\'' . $value['COLUMN_NAME'],
91
+                'javascript:NewCssCal(\''.$value['COLUMN_NAME'],
92 92
                 '\',\'yyyyMMdd\',\'dropdown\',false,\'24\',false);',
93 93
             ]),
94 94
         ];
95
-        return $this->setStringIntoShortTag('input', $inA) . $this->setCalendarControl($value['COLUMN_NAME']);
95
+        return $this->setStringIntoShortTag('input', $inA).$this->setCalendarControl($value['COLUMN_NAME']);
96 96
     }
97 97
 
98 98
     /**
@@ -181,7 +181,7 @@  discard block
 block discarded – undo
181 181
                 return [$line[0], $line[1]];
182 182
             // intentionally left open
183 183
             case 'array_key2_value':
184
-                return [$line[0] . '@' . $line[1], $line[1]];
184
+                return [$line[0].'@'.$line[1], $line[1]];
185 185
             // intentionally left open
186 186
             case 'array_numbered':
187 187
                 return [$counter, $line[0]];
Please login to merge, or discard this patch.
source/MySQLiByDanielGPstructures.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
     private function correctTableWithQuotesAsFieldPrefix($referenceTable)
50 50
     {
51 51
         if ($referenceTable != '') {
52
-            return '`' . str_replace('`', '', $referenceTable) . '`.';
52
+            return '`'.str_replace('`', '', $referenceTable).'`.';
53 53
         }
54 54
         return '';
55 55
     }
@@ -64,8 +64,8 @@  discard block
 block discarded – undo
64 64
      */
65 65
     protected function getFieldOutputTextFK($foreignKeysArray, $value, $iar)
66 66
     {
67
-        $query   = $this->sQueryGenericSelectKeyValue([
68
-            '`' . $value['COLUMN_NAME'] . '`',
67
+        $query = $this->sQueryGenericSelectKeyValue([
68
+            '`'.$value['COLUMN_NAME'].'`',
69 69
             $foreignKeysArray[$value['COLUMN_NAME']][2],
70 70
             $foreignKeysArray[$value['COLUMN_NAME']][0]
71 71
         ]);
@@ -280,8 +280,8 @@  discard block
 block discarded – undo
280 280
     {
281 281
         $filters2 = implode(', ', array_diff($value, ['']));
282 282
         if ($filters2 != '') {
283
-            return '(' . $referenceTable . '`' . $key . '` IN ("'
284
-                . str_replace(',', '","', str_replace(["'", '"'], '', $filters2)) . '"))';
283
+            return '('.$referenceTable.'`'.$key.'` IN ("'
284
+                . str_replace(',', '","', str_replace(["'", '"'], '', $filters2)).'"))';
285 285
         }
286 286
         return '';
287 287
     }
@@ -299,7 +299,7 @@  discard block
 block discarded – undo
299 299
         if ((substr($value, 0, 1) == '%') && (substr($value, -1) == '%')) {
300 300
             $fTemp = 'LIKE';
301 301
         }
302
-        return '(`' . $key . '` ' . $fTemp . '"' . $value . '")';
302
+        return '(`'.$key.'` '.$fTemp.'"'.$value.'")';
303 303
     }
304 304
 
305 305
     /**
Please login to merge, or discard this patch.
source/MySQLiByDanielGPqueriesBasic.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -54,13 +54,13 @@  discard block
 block discarded – undo
54 54
         $this->sCleanParameters($parameters);
55 55
         return implode(' ', [
56 56
             'SELECT',
57
-            $parameters[0] . ', ' . $parameters[1],
57
+            $parameters[0].', '.$parameters[1],
58 58
             'FROM',
59 59
             $parameters[2],
60 60
             'GROUP BY',
61 61
             $parameters[0],
62 62
             'ORDER BY',
63
-            $parameters[1] . ';'
63
+            $parameters[1].';'
64 64
         ]);
65 65
     }
66 66
 
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
     {
75 75
         $sDBs = 'WHERE '
76 76
             . '`SCHEMA_NAME` NOT IN ("'
77
-            . implode('", "', ['information_schema', 'mysql', 'performance_schema', 'sys']) . '") ';
77
+            . implode('", "', ['information_schema', 'mysql', 'performance_schema', 'sys']).'") ';
78 78
         return 'SELECT '
79 79
             . '`SCHEMA_NAME` As `Db`, `DEFAULT_CHARACTER_SET_NAME` AS `DbCharset`, '
80 80
             . '`DEFAULT_COLLATION_NAME` AS `DbCollation` '
@@ -128,16 +128,16 @@  discard block
 block discarded – undo
128 128
     {
129 129
         $this->sCleanParameters($parameters);
130 130
         return 'SELECT * '
131
-            . 'FROM `' . $parameters[0] . '` '
132
-            . 'WHERE ' . $parameters[1] . ';';
131
+            . 'FROM `'.$parameters[0].'` '
132
+            . 'WHERE '.$parameters[1].';';
133 133
     }
134 134
 
135 135
     protected function sQueryToDeleteSingleIdentifier($parameters)
136 136
     {
137 137
         $this->sCleanParameters($parameters);
138 138
         return 'DELETE '
139
-            . 'FROM `' . $parameters[0] . '` '
140
-            . 'WHERE `' . $parameters[1] . '` = "' . $parameters[2] . '";';
139
+            . 'FROM `'.$parameters[0].'` '
140
+            . 'WHERE `'.$parameters[1].'` = "'.$parameters[2].'";';
141 141
     }
142 142
 
143 143
 }
Please login to merge, or discard this patch.
source/MySQLiByDanielGPqueries.php 1 patch
Spacing   +28 added lines, -28 removed lines patch added patch discarded remove patch
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
     private function sGlueFilterValIntoWhereStr($filterValue)
67 67
     {
68 68
         if (is_array($filterValue)) {
69
-            return 'IN ("' . implode('", "', $filterValue) . '")';
69
+            return 'IN ("'.implode('", "', $filterValue).'")';
70 70
         }
71 71
         return $this->sGlueFilterValueIntoWhereStringFinal($filterValue);
72 72
     }
@@ -79,13 +79,13 @@  discard block
 block discarded – undo
79 79
             'NOT NULL|NULL',
80 80
         ];
81 81
         if (in_array($filterValue, explode('|', $kFields[0]))) {
82
-            return '= ' . $filterValue;
82
+            return '= '.$filterValue;
83 83
         } elseif (in_array($filterValue, explode('|', $kFields[1]))) {
84 84
             return $filterValue;
85 85
         } elseif (in_array($filterValue, explode('|', $kFields[2]))) {
86
-            return 'IS ' . $filterValue;
86
+            return 'IS '.$filterValue;
87 87
         }
88
-        return '= "' . $filterValue . '"';
88
+        return '= "'.$filterValue.'"';
89 89
     }
90 90
 
91 91
     /**
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
      */
97 97
     private function sGlueFiltersIntoWhereArrayFilter($filters)
98 98
     {
99
-        return '(' . implode(') AND (', $filters) . ')';
99
+        return '('.implode(') AND (', $filters).')';
100 100
     }
101 101
 
102 102
     /**
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
         if (is_array($filterArray)) {
116 116
             unset($filterArray['LIMIT']);
117 117
             foreach ($filterArray as $key => $value) {
118
-                $fltr[] = '`' . $tableToApplyFilterTo . '`.`' . $key . '` ' . $this->sGlueFilterValIntoWhereStr($value);
118
+                $fltr[] = '`'.$tableToApplyFilterTo.'`.`'.$key.'` '.$this->sGlueFilterValIntoWhereStr($value);
119 119
             }
120 120
         }
121 121
         return $this->sManageDynamicFiltersFinal($fltr);
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
     {
126 126
         if (count($filters) > 0) {
127 127
             $sReturn = ['WHERE', $this->sGlueFiltersIntoWhereArrayFilter($filters)];
128
-            return implode(' ', $sReturn) . ' ';
128
+            return implode(' ', $sReturn).' ';
129 129
         }
130 130
         return '';
131 131
     }
@@ -146,13 +146,13 @@  discard block
 block discarded – undo
146 146
         $filterArray = (is_array($filterArray) ? $filterArray : ['' => '']);
147 147
         return 'SELECT '
148 148
             . '`C`.`TABLE_SCHEMA`, '
149
-            . $this->sQueryMySqlColumnsColumns() . ' '
149
+            . $this->sQueryMySqlColumnsColumns().' '
150 150
             . 'FROM `information_schema`.`COLUMNS` `C` '
151
-            . 'LEFT JOIN `information_schema`.`KEY_COLUMN_USAGE` `KCU` ON ((' . implode(') AND (', [
151
+            . 'LEFT JOIN `information_schema`.`KEY_COLUMN_USAGE` `KCU` ON (('.implode(') AND (', [
152 152
                 '`C`.`TABLE_SCHEMA` = `KCU`.`TABLE_SCHEMA`',
153 153
                 '`C`.`TABLE_NAME` = `KCU`.`TABLE_NAME`',
154 154
                 '`C`.`COLUMN_NAME` = `KCU`.`COLUMN_NAME`',
155
-            ]) . ')) '
155
+            ]).')) '
156 156
             . $this->sManageDynamicFilters($filterArray, 'C')
157 157
             . 'GROUP BY `C`.`TABLE_SCHEMA`, `C`.`TABLE_NAME`, `C`.`COLUMN_NAME` '
158 158
             . 'ORDER BY `C`.`TABLE_SCHEMA`, `C`.`TABLE_NAME`, `C`.`ORDINAL_POSITION` '
@@ -179,20 +179,20 @@  discard block
 block discarded – undo
179 179
     {
180 180
         return 'SELECT '
181 181
             . '`KCU`.`CONSTRAINT_SCHEMA`, '
182
-            . $this->sQueryMySqlIndexesColumns() . ' '
182
+            . $this->sQueryMySqlIndexesColumns().' '
183 183
             . 'FROM `information_schema`.`KEY_COLUMN_USAGE` `KCU` '
184
-            . 'INNER JOIN `information_schema`.`COLUMNS` `C` ON ((' . implode(') AND (', [
184
+            . 'INNER JOIN `information_schema`.`COLUMNS` `C` ON (('.implode(') AND (', [
185 185
                 '`C`.`TABLE_SCHEMA` = `KCU`.`TABLE_SCHEMA`',
186 186
                 '`C`.`TABLE_NAME` = `KCU`.`TABLE_NAME`',
187 187
                 '`C`.`COLUMN_NAME` = `KCU`.`COLUMN_NAME`',
188
-            ]) . ')) '
189
-            . 'LEFT JOIN `information_schema`.`REFERENTIAL_CONSTRAINTS` `RC` ON ((' . implode(') AND (', [
188
+            ]).')) '
189
+            . 'LEFT JOIN `information_schema`.`REFERENTIAL_CONSTRAINTS` `RC` ON (('.implode(') AND (', [
190 190
                 '`KCU`.`CONSTRAINT_SCHEMA` = `RC`.`CONSTRAINT_SCHEMA`',
191 191
                 '`KCU`.`CONSTRAINT_NAME` = `RC`.`CONSTRAINT_NAME`',
192
-            ]) . ')) '
192
+            ]).')) '
193 193
             . $this->sManageDynamicFilters($filterArray, 'KCU')
194 194
             . 'ORDER BY `KCU`.`TABLE_SCHEMA`, `KCU`.`TABLE_NAME`'
195
-            . $this->xtraSoring($filterArray, 'COLUMN_NAME') . ';';
195
+            . $this->xtraSoring($filterArray, 'COLUMN_NAME').';';
196 196
     }
197 197
 
198 198
     private function sQueryMySqlIndexesColumns()
@@ -208,23 +208,23 @@  discard block
 block discarded – undo
208 208
     {
209 209
         $tblAls  = substr($tblName, 0, 1);
210 210
         $colName = (is_null($adtnlCol) ? $tblName : $adtnlFltr);
211
-        return '(SELECT COUNT(*) AS `No. of records` FROM `information_schema`.`' . $tblName . '` `' . $tblAls . '` '
212
-            . 'WHERE (`' . $tblAls . '`.`' . $lnkDbCol . '` = `S`.`SCHEMA_NAME`)'
213
-            . (!is_null($adtnlCol) ? ' AND (`' . $tblAls . '`.`' . $adtnlCol . '` = "' . $adtnlFltr . '")' : '')
214
-            . ') AS `' . ucwords(strtolower($colName)) . '`';
211
+        return '(SELECT COUNT(*) AS `No. of records` FROM `information_schema`.`'.$tblName.'` `'.$tblAls.'` '
212
+            . 'WHERE (`'.$tblAls.'`.`'.$lnkDbCol.'` = `S`.`SCHEMA_NAME`)'
213
+            . (!is_null($adtnlCol) ? ' AND (`'.$tblAls.'`.`'.$adtnlCol.'` = "'.$adtnlFltr.'")' : '')
214
+            . ') AS `'.ucwords(strtolower($colName)).'`';
215 215
     }
216 216
 
217 217
     protected function sQueryMySqlStatistics($filterArray = null)
218 218
     {
219 219
         return 'SELECT '
220 220
             . '`S`.`SCHEMA_NAME`, '
221
-            . $this->sQueryMySqlStatisticPattern('TABLES', 'TABLE_SCHEMA', 'TABLE_TYPE', 'BASE TABLE') . ', '
222
-            . $this->sQueryMySqlStatisticPattern('TABLES', 'TABLE_SCHEMA', 'TABLE_TYPE', 'VIEW') . ', '
223
-            . $this->sQueryMySqlStatisticPattern('COLUMNS', 'TABLE_SCHEMA') . ', '
224
-            . $this->sQueryMySqlStatisticPattern('TRIGGERS', 'EVENT_OBJECT_SCHEMA') . ', '
225
-            . $this->sQueryMySqlStatisticPattern('ROUTINES', 'ROUTINE_SCHEMA', 'ROUTINE_TYPE', 'Function') . ', '
226
-            . $this->sQueryMySqlStatisticPattern('ROUTINES', 'ROUTINE_SCHEMA', 'ROUTINE_TYPE', 'Procedure') . ', '
227
-            . $this->sQueryMySqlStatisticPattern('EVENTS', 'EVENT_SCHEMA') . ' '
221
+            . $this->sQueryMySqlStatisticPattern('TABLES', 'TABLE_SCHEMA', 'TABLE_TYPE', 'BASE TABLE').', '
222
+            . $this->sQueryMySqlStatisticPattern('TABLES', 'TABLE_SCHEMA', 'TABLE_TYPE', 'VIEW').', '
223
+            . $this->sQueryMySqlStatisticPattern('COLUMNS', 'TABLE_SCHEMA').', '
224
+            . $this->sQueryMySqlStatisticPattern('TRIGGERS', 'EVENT_OBJECT_SCHEMA').', '
225
+            . $this->sQueryMySqlStatisticPattern('ROUTINES', 'ROUTINE_SCHEMA', 'ROUTINE_TYPE', 'Function').', '
226
+            . $this->sQueryMySqlStatisticPattern('ROUTINES', 'ROUTINE_SCHEMA', 'ROUTINE_TYPE', 'Procedure').', '
227
+            . $this->sQueryMySqlStatisticPattern('EVENTS', 'EVENT_SCHEMA').' '
228 228
             . 'FROM `information_schema`.`SCHEMATA` `S` '
229 229
             . 'WHERE (`S`.`SCHEMA_NAME` NOT IN ("information_schema", "mysql", "performance_schema", "sys")) '
230 230
             . str_replace('WHERE', 'AND', $this->sManageDynamicFilters($filterArray, 'S'))
@@ -245,7 +245,7 @@  discard block
 block discarded – undo
245 245
             . ', `T`.`CREATE_OPTIONS`, `T`.`TABLE_COMMENT` '
246 246
             . 'FROM `information_schema`.`TABLES` `T` '
247 247
             . $this->sManageDynamicFilters($filterArray, 'T')
248
-            . $this->xtraSoring($filterArray, 'TABLE_SCHEMA') . ';';
248
+            . $this->xtraSoring($filterArray, 'TABLE_SCHEMA').';';
249 249
     }
250 250
 
251 251
     private function xtraSoring($filterArray, $filterValueToDecide)
Please login to merge, or discard this patch.