Passed
Push — main ( d70ce6...1926a3 )
by Thierry
02:00
created
src/DbAdmin/CommandAdmin.php 3 patches
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
      * @param mixed $value
39 39
      *
40 40
      * @return string
41
-    */
41
+     */
42 42
     // protected function editLink($value)
43 43
     // {
44 44
     //     $link = '';
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
      * @param array $blobs
65 65
      *
66 66
      * @return string
67
-    */
67
+     */
68 68
     protected function values(array $row, array $blobs)
69 69
     {
70 70
         $values = [];
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
      * @param int $limit
93 93
      *
94 94
      * @return string
95
-    */
95
+     */
96 96
     private function message($statement, int $rowCount, int $limit)
97 97
     {
98 98
         $numRows = $statement->rowCount();
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
      * @param array $orgtables
112 112
      *
113 113
      * @return string
114
-    */
114
+     */
115 115
     // protected function indexes($field, array $orgtables)
116 116
     // {
117 117
     //     static $links = []; // colno => orgtable - create links from these columns
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
      * @param array $orgtables
150 150
      *
151 151
      * @return array
152
-    */
152
+     */
153 153
     protected function select($statement, $limit = 0, $orgtables = [])
154 154
     {
155 155
         $blobs = []; // colno => bool - display bytes for blobs
Please login to merge, or discard this patch.
Spacing   +4 added lines, -7 removed lines patch added patch discarded remove patch
@@ -210,9 +210,7 @@  discard block
 block discarded – undo
210 210
 
211 211
         // TODO: Move this to driver implementations
212 212
         $parse = '[\'"' .
213
-            ($this->driver->jush() == "sql" ? '`#' :
214
-            ($this->driver->jush() == "sqlite" ? '`[' :
215
-            ($this->driver->jush() == "mssql" ? '[' : ''))) . ']|/\*|-- |$' .
213
+            ($this->driver->jush() == "sql" ? '`#' : ($this->driver->jush() == "sqlite" ? '`[' : ($this->driver->jush() == "mssql" ? '[' : ''))) . ']|/\*|-- |$' .
216 214
             ($this->driver->jush() == "pgsql" ? '|\$[^$]*\$' : '');
217 215
         // should always match
218 216
         \preg_match('(' . \preg_quote($delimiter) . "\\s*|$parse)", $queries, $match, PREG_OFFSET_CAPTURE, $offset);
@@ -225,8 +223,7 @@  discard block
 block discarded – undo
225 223
 
226 224
         if (!empty($found) && \rtrim($found) != $delimiter) {
227 225
             // find matching quote or comment end
228
-            while (\preg_match('(' . ($found == '/*' ? '\*/' : ($found == '[' ? ']' :
229
-                (\preg_match('~^-- |^#~', $found) ? "\n" : \preg_quote($found) . "|\\\\."))) . '|$)s',
226
+            while (\preg_match('(' . ($found == '/*' ? '\*/' : ($found == '[' ? ']' : (\preg_match('~^-- |^#~', $found) ? "\n" : \preg_quote($found) . "|\\\\."))) . '|$)s',
230 227
                 $queries, $match, PREG_OFFSET_CAPTURE, $offset)) {
231 228
                 //! respect sql_mode NO_BACKSLASH_ESCAPES
232 229
                 $s = $match[0][0];
@@ -326,7 +323,7 @@  discard block
 block discarded – undo
326 323
                 \ini_set('memory_limit', \max($this->util->iniBytes('memory_limit'),
327 324
                     2 * \strlen($queries) + \memory_get_usage() + 8e6));
328 325
             }
329
-            catch(\Exception $e) {
326
+            catch (\Exception $e) {
330 327
                 // Do nothing if the option is not modified.
331 328
             }
332 329
         }
@@ -379,7 +376,7 @@  discard block
 block discarded – undo
379 376
         if ($empty) {
380 377
             $messages[] = $this->trans->lang('No commands to execute.');
381 378
         } elseif ($onlyErrors) {
382
-            $messages[] =  $this->trans->lang('%d query(s) executed OK.', $commands - \count($errors));
379
+            $messages[] = $this->trans->lang('%d query(s) executed OK.', $commands - \count($errors));
383 380
             // $timestamps[] = $this->trans->formatTime($total_start);
384 381
         }
385 382
         // elseif($errors && $commands > 1)
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -325,8 +325,7 @@
 block discarded – undo
325 325
             try {
326 326
                 \ini_set('memory_limit', \max($this->util->iniBytes('memory_limit'),
327 327
                     2 * \strlen($queries) + \memory_get_usage() + 8e6));
328
-            }
329
-            catch(\Exception $e) {
328
+            } catch(\Exception $e) {
330 329
                 // Do nothing if the option is not modified.
331 330
             }
332 331
         }
Please login to merge, or discard this patch.