Completed
Push — master ( ba5c9a...11029f )
by Daniel
05:34
created
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/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.