Completed
Pull Request — master (#3788)
by Craig
01:31
created
src/lib/legacy/util/FilterUtil/Filter/Pmlist.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -173,9 +173,9 @@  discard block
 block discarded – undo
173 173
                     $items[] = $item['id'];
174 174
                 }
175 175
                 if (count($items) == 1) {
176
-                    $where = "$column = '".implode("", $items)."'";
176
+                    $where = "$column = '" . implode("", $items) . "'";
177 177
                 } else {
178
-                    $where = "$column IN ('".implode("','", $items)."')";
178
+                    $where = "$column IN ('" . implode("','", $items) . "')";
179 179
                 }
180 180
                 break;
181 181
         }
@@ -217,9 +217,9 @@  discard block
 block discarded – undo
217 217
                     $items[] = $item['id'];
218 218
                 }
219 219
                 if (count($items) == 1) {
220
-                    $where = "$column = '".implode("", $items)."'";
220
+                    $where = "$column = '" . implode("", $items) . "'";
221 221
                 } else {
222
-                    $where = "$column IN ('".implode("','", $items)."')";
222
+                    $where = "$column IN ('" . implode("','", $items) . "')";
223 223
                 }
224 224
                 break;
225 225
         }
Please login to merge, or discard this patch.
src/lib/legacy/util/FilterUtil/Filter/Mnlist.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -231,14 +231,14 @@
 block discarded – undo
231 231
         switch ($op) {
232 232
             case 'ne':
233 233
                 $where = $value.' NOT IN ('.
234
-                         'SELECT '.$this->mncolumn[$field][$this->fields[$field]].' FROM '.$this->mntable[$field].' '.$alias.
235
-                         ' WHERE '.$this->column[$this->comparefield[$field]]." = $alias.".$this->mncolumn[$field][$this->comparefield[$field]].')';
234
+                            'SELECT '.$this->mncolumn[$field][$this->fields[$field]].' FROM '.$this->mntable[$field].' '.$alias.
235
+                            ' WHERE '.$this->column[$this->comparefield[$field]]." = $alias.".$this->mncolumn[$field][$this->comparefield[$field]].')';
236 236
                 break;
237 237
 
238 238
             case 'eq':
239 239
                 $where = $value.' IN ('.
240
-                         'SELECT '.$this->mncolumn[$field][$this->fields[$field]].' FROM '.$this->mntable[$field].' '.$alias.
241
-                         ' WHERE '.$this->column[$this->comparefield[$field]]." = $alias.".$this->mncolumn[$field][$this->comparefield[$field]].')';
240
+                            'SELECT '.$this->mncolumn[$field][$this->fields[$field]].' FROM '.$this->mntable[$field].' '.$alias.
241
+                            ' WHERE '.$this->column[$this->comparefield[$field]]." = $alias.".$this->mncolumn[$field][$this->comparefield[$field]].')';
242 242
                 break;
243 243
         }
244 244
 
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -230,15 +230,15 @@
 block discarded – undo
230 230
 
231 231
         switch ($op) {
232 232
             case 'ne':
233
-                $where = $value.' NOT IN ('.
234
-                         'SELECT '.$this->mncolumn[$field][$this->fields[$field]].' FROM '.$this->mntable[$field].' '.$alias.
235
-                         ' WHERE '.$this->column[$this->comparefield[$field]]." = $alias.".$this->mncolumn[$field][$this->comparefield[$field]].')';
233
+                $where = $value . ' NOT IN (' .
234
+                         'SELECT ' . $this->mncolumn[$field][$this->fields[$field]] . ' FROM ' . $this->mntable[$field] . ' ' . $alias .
235
+                         ' WHERE ' . $this->column[$this->comparefield[$field]] . " = $alias." . $this->mncolumn[$field][$this->comparefield[$field]] . ')';
236 236
                 break;
237 237
 
238 238
             case 'eq':
239
-                $where = $value.' IN ('.
240
-                         'SELECT '.$this->mncolumn[$field][$this->fields[$field]].' FROM '.$this->mntable[$field].' '.$alias.
241
-                         ' WHERE '.$this->column[$this->comparefield[$field]]." = $alias.".$this->mncolumn[$field][$this->comparefield[$field]].')';
239
+                $where = $value . ' IN (' .
240
+                         'SELECT ' . $this->mncolumn[$field][$this->fields[$field]] . ' FROM ' . $this->mntable[$field] . ' ' . $alias .
241
+                         ' WHERE ' . $this->column[$this->comparefield[$field]] . " = $alias." . $this->mncolumn[$field][$this->comparefield[$field]] . ')';
242 242
                 break;
243 243
         }
244 244
 
Please login to merge, or discard this patch.
src/lib/legacy/util/ZLoader.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
 
56 56
         $separator = $separator === '\\' ? '' : $separator;
57 57
 
58
-        self::$autoloader->add($namespace.$separator, $paths);
58
+        self::$autoloader->add($namespace . $separator, $paths);
59 59
     }
60 60
 
61 61
     public static function addPrefix($prefix, $paths)
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
         if (strpos($class, '_')) {
136 136
             $array = explode('_', $class);
137 137
             $prefix = (isset($map[$array[0]]) ? $map[$array[0]] . '/' : '');
138
-            $path = __DIR__.'/../'.$prefix . str_replace('_', '/', $class) . '.php';
138
+            $path = __DIR__ . '/../' . $prefix . str_replace('_', '/', $class) . '.php';
139 139
             if (file_exists($path)) {
140 140
                 return include $path;
141 141
             }
Please login to merge, or discard this patch.
src/lib/legacy/util/LogUtil.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -86,7 +86,7 @@
 block discarded – undo
86 86
 
87 87
         $session = ServiceUtil::getManager()->get('session');
88 88
         $warns = $session->getFlashBag()->peek(Zikula_Session::MESSAGE_WARNING);
89
-        $errs =  $session->getFlashBag()->peek(Zikula_Session::MESSAGE_ERROR);
89
+        $errs = $session->getFlashBag()->peek(Zikula_Session::MESSAGE_ERROR);
90 90
 
91 91
         if (!empty($errs) && $override) {
92 92
             $warns = $errs;
Please login to merge, or discard this patch.
src/lib/legacy/util/System.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -896,7 +896,7 @@  discard block
 block discarded – undo
896 896
             // we are in the homepage, checks if language code is forced
897 897
             if (ZLanguage::getLangUrlRule() && $lang) {
898 898
                 // and redirect then
899
-                self::redirect(self::getCurrentUrl()."/$lang", [], 302, true);
899
+                self::redirect(self::getCurrentUrl() . "/$lang", [], 302, true);
900 900
                 self::shutDown();
901 901
             }
902 902
         } else {
@@ -910,7 +910,7 @@  discard block
 block discarded – undo
910 910
                     foreach ($args as $k => $v) {
911 911
                         $args[$k] = urlencode($v);
912 912
                     }
913
-                    self::redirect(self::getBaseUrl().$frontController.($args ? implode('/', $args) : ''), [], 302, true);
913
+                    self::redirect(self::getBaseUrl() . $frontController . ($args ? implode('/', $args) : ''), [], 302, true);
914 914
                     self::shutDown();
915 915
                 }
916 916
                 self::queryStringSetVar('lang', $args[0], $request);
@@ -921,7 +921,7 @@  discard block
 block discarded – undo
921 921
                     $args[$k] = urlencode($v);
922 922
                 }
923 923
                 $langTheme = isset($_GET['theme']) ? "$lang/$_GET[theme]" : $lang;
924
-                self::redirect(self::getBaseUrl().$frontController.$langTheme.'/'.implode('/', $args), [], 302, true);
924
+                self::redirect(self::getBaseUrl() . $frontController . $langTheme . '/' . implode('/', $args), [], 302, true);
925 925
                 self::shutDown();
926 926
             }
927 927
 
Please login to merge, or discard this patch.
src/lib/legacy/util/UserUtil.php 2 patches
Indentation   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -480,14 +480,14 @@  discard block
 block discarded – undo
480 480
 
481 481
         // count of uname appearances in users table
482 482
         $qb = $em->createQueryBuilder()
483
-                 ->select('COUNT(u.uid)')
484
-                 ->from('ZikulaUsersModule:UserEntity', 'u')
485
-                 ->where('u.uname = :uname')
486
-                 ->setParameter('uname', $uname);
483
+                    ->select('COUNT(u.uid)')
484
+                    ->from('ZikulaUsersModule:UserEntity', 'u')
485
+                    ->where('u.uname = :uname')
486
+                    ->setParameter('uname', $uname);
487 487
 
488 488
         if ($excludeUid > 1) {
489 489
             $qb->andWhere('u.uid <> :excludeUid')
490
-               ->setParameter('excludeUid', $excludeUid);
490
+                ->setParameter('excludeUid', $excludeUid);
491 491
         }
492 492
 
493 493
         $query = $qb->getQuery();
@@ -518,14 +518,14 @@  discard block
 block discarded – undo
518 518
 
519 519
         // count of email appearances in users table
520 520
         $qb = $em->createQueryBuilder()
521
-                 ->select('COUNT(u.uid)')
522
-                 ->from('ZikulaUsersModule:UserEntity', 'u')
523
-                 ->where('u.email = :email')
524
-                 ->setParameter('email', $emailAddress);
521
+                    ->select('COUNT(u.uid)')
522
+                    ->from('ZikulaUsersModule:UserEntity', 'u')
523
+                    ->where('u.email = :email')
524
+                    ->setParameter('email', $emailAddress);
525 525
 
526 526
         if ($excludeUid > 1) {
527 527
             $qb->andWhere('u.uid <> :excludeUid')
528
-               ->setParameter('excludeUid', $excludeUid);
528
+                ->setParameter('excludeUid', $excludeUid);
529 529
         }
530 530
 
531 531
         $query = $qb->getQuery();
@@ -534,16 +534,16 @@  discard block
 block discarded – undo
534 534
 
535 535
         // count of email appearances in users verification table
536 536
         $qb = $em->createQueryBuilder()
537
-                 ->select('COUNT(v.uid)')
538
-                 ->from('ZikulaZAuthModule:UserVerificationEntity', 'v')
539
-                 ->where('v.newemail = :email')
540
-                 ->andWhere('v.changetype = :chgtype')
541
-                 ->setParameter('email', $emailAddress)
542
-                 ->setParameter('chgtype', ZAuthConstant::VERIFYCHGTYPE_EMAIL);
537
+                    ->select('COUNT(v.uid)')
538
+                    ->from('ZikulaZAuthModule:UserVerificationEntity', 'v')
539
+                    ->where('v.newemail = :email')
540
+                    ->andWhere('v.changetype = :chgtype')
541
+                    ->setParameter('email', $emailAddress)
542
+                    ->setParameter('chgtype', ZAuthConstant::VERIFYCHGTYPE_EMAIL);
543 543
 
544 544
         if ($excludeUid > 1) {
545 545
             $qb->andWhere('v.uid <> :excludeUid')
546
-               ->setParameter('excludeUid', $excludeUid);
546
+                ->setParameter('excludeUid', $excludeUid);
547 547
         }
548 548
 
549 549
         $query = $qb->getQuery();
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -266,7 +266,7 @@  discard block
 block discarded – undo
266 266
 
267 267
         $str = self::getGroupListForUser($uid, '_');
268 268
 
269
-        return $str == '-1' ? 'guest' : 'groups_'.$str;
269
+        return $str == '-1' ? 'guest' : 'groups_' . $str;
270 270
     }
271 271
 
272 272
     /**
@@ -285,7 +285,7 @@  discard block
 block discarded – undo
285 285
 
286 286
         $uid = $uid ? (int)$uid : self::getVar('uid');
287 287
 
288
-        return !$uid ? 'guest' : 'uid_'.$uid;
288
+        return !$uid ? 'guest' : 'uid_' . $uid;
289 289
     }
290 290
 
291 291
     /**
@@ -1519,7 +1519,7 @@  discard block
 block discarded – undo
1519 1519
         if (!empty($sortbyfield)) {
1520 1520
             $sortFragments = [];
1521 1521
 
1522
-            $sortFragments[] = 'u.'. $sortbyfield . ' ' . DataUtil::formatForStore($sortorder);
1522
+            $sortFragments[] = 'u.' . $sortbyfield . ' ' . DataUtil::formatForStore($sortorder);
1523 1523
 
1524 1524
             if ($sortbyfield != 'uname') {
1525 1525
                 $sortFragments[] = 'u.uname ASC';
Please login to merge, or discard this patch.