Passed
Push — master ( 08c22c...f61562 )
by Michael
03:58
created
include/search.inc.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -64,10 +64,10 @@  discard block
 block discarded – undo
64 64
 
65 65
     $queryarrayHold = $queryarray;
66 66
     if ((is_array($queryarray)) && !empty($queryarray)) {
67
-        $criteria->add(new \Criteria('category_title', '%' . $queryarray[0] . '%', 'LIKE'));
67
+        $criteria->add(new \Criteria('category_title', '%'.$queryarray[0].'%', 'LIKE'));
68 68
         array_shift($queryarray); //get rid of first element
69 69
         foreach ($queryarray as $query) {
70
-            $criteria->add(new \Criteria('category_title', '%' . $query . '%', 'LIKE'), $andor);
70
+            $criteria->add(new \Criteria('category_title', '%'.$query.'%', 'LIKE'), $andor);
71 71
         }
72 72
     }
73 73
     $catArray   = $contentsHandler->getAll($criteria, $contentFields, false);
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
     foreach ($catArray as $cId => $cat) {
77 77
         $ret[] = [
78 78
             'image' => 'assets/images/folder.png',
79
-            'link'  => $helper->url('index.php?cat_id=' . $cId),
79
+            'link'  => $helper->url('index.php?cat_id='.$cId),
80 80
             'title' => $cat['category_title'],
81 81
         ];
82 82
     }
@@ -94,20 +94,20 @@  discard block
 block discarded – undo
94 94
     $criteria->setStart((int)$offset);
95 95
 
96 96
     if ((is_array($queryarray)) && !empty($queryarray)) {
97
-        $criteria->add(new \Criteria('contents_title', '%' . $queryarray[0] . '%', 'LIKE'));
98
-        $criteria->add(new \Criteria('contents_contents', '%' . $queryarray[0] . '%', 'LIKE'), 'OR');
97
+        $criteria->add(new \Criteria('contents_title', '%'.$queryarray[0].'%', 'LIKE'));
98
+        $criteria->add(new \Criteria('contents_contents', '%'.$queryarray[0].'%', 'LIKE'), 'OR');
99 99
         array_shift($queryarray); //get rid of first element
100 100
 
101 101
         foreach ($queryarray as $query) {
102
-            $criteria->add(new \Criteria('contents_title', '%' . $query . '%', 'LIKE'), $andor);
103
-            $criteria->add(new \Criteria('contents_contents', '%' . $query . '%', 'LIKE'), 'OR');
102
+            $criteria->add(new \Criteria('contents_title', '%'.$query.'%', 'LIKE'), $andor);
103
+            $criteria->add(new \Criteria('contents_contents', '%'.$query.'%', 'LIKE'), 'OR');
104 104
         }
105 105
     }
106 106
     $contentArray = $contentsHandler->getAll($criteria, $contentFields, false);
107 107
     foreach ($contentArray as $content) {
108 108
         $ret[] = [
109 109
             'image' => 'assets/images/question2.gif',
110
-            'link'  => $helper->url('index.php?cat_id=' . $content['contents_cid'] . '#q' . $content['contents_id']),
110
+            'link'  => $helper->url('index.php?cat_id='.$content['contents_cid'].'#q'.$content['contents_id']),
111 111
             'title' => $content['contents_title'],
112 112
             'time'  => $content['contents_publish'],
113 113
         ];
Please login to merge, or discard this patch.
include/onupdate.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@
 block discarded – undo
29 29
 if ((!defined('XOOPS_ROOT_PATH'))
30 30
     || !($GLOBALS['xoopsUser'] instanceof XoopsUser)
31 31
     || !($GLOBALS['xoopsUser']->isAdmin())) {
32
-    exit('Restricted access' . PHP_EOL);
32
+    exit('Restricted access'.PHP_EOL);
33 33
 }
34 34
 
35 35
 /**
Please login to merge, or discard this patch.
include/oninstall.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@
 block discarded – undo
31 31
 if ((!defined('XOOPS_ROOT_PATH'))
32 32
     || !($GLOBALS['xoopsUser'] instanceof XoopsUser)
33 33
     || !($GLOBALS['xoopsUser']->isAdmin())) {
34
-    exit('Restricted access' . PHP_EOL);
34
+    exit('Restricted access'.PHP_EOL);
35 35
 }
36 36
 
37 37
 /**
Please login to merge, or discard this patch.
include/search.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -64,10 +64,10 @@  discard block
 block discarded – undo
64 64
 
65 65
     $queryarrayHold = $queryarray;
66 66
     if ((is_array($queryarray)) && !empty($queryarray)) {
67
-        $criteria->add(new \Criteria('category_title', '%' . $queryarray[0] . '%', 'LIKE'));
67
+        $criteria->add(new \Criteria('category_title', '%'.$queryarray[0].'%', 'LIKE'));
68 68
         array_shift($queryarray); //get rid of first element
69 69
         foreach ($queryarray as $query) {
70
-            $criteria->add(new \Criteria('category_title', '%' . $query . '%', 'LIKE'), $andor);
70
+            $criteria->add(new \Criteria('category_title', '%'.$query.'%', 'LIKE'), $andor);
71 71
         }
72 72
     }
73 73
     $catArray   = $contentsHandler->getAll($criteria, $contentFields, false);
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
     foreach ($catArray as $cId => $cat) {
77 77
         $ret[] = [
78 78
             'image' => 'assets/images/folder.png',
79
-            'link'  => $helper->url('index.php?cat_id=' . $cId),
79
+            'link'  => $helper->url('index.php?cat_id='.$cId),
80 80
             'title' => $cat['category_title'],
81 81
         ];
82 82
     }
@@ -94,20 +94,20 @@  discard block
 block discarded – undo
94 94
     $criteria->setStart((int)$offset);
95 95
 
96 96
     if ((is_array($queryarray)) && !empty($queryarray)) {
97
-        $criteria->add(new \Criteria('contents_title', '%' . $queryarray[0] . '%', 'LIKE'));
98
-        $criteria->add(new \Criteria('contents_contents', '%' . $queryarray[0] . '%', 'LIKE'), 'OR');
97
+        $criteria->add(new \Criteria('contents_title', '%'.$queryarray[0].'%', 'LIKE'));
98
+        $criteria->add(new \Criteria('contents_contents', '%'.$queryarray[0].'%', 'LIKE'), 'OR');
99 99
         array_shift($queryarray); //get rid of first element
100 100
 
101 101
         foreach ($queryarray as $query) {
102
-            $criteria->add(new \Criteria('contents_title', '%' . $query . '%', 'LIKE'), $andor);
103
-            $criteria->add(new \Criteria('contents_contents', '%' . $query . '%', 'LIKE'), 'OR');
102
+            $criteria->add(new \Criteria('contents_title', '%'.$query.'%', 'LIKE'), $andor);
103
+            $criteria->add(new \Criteria('contents_contents', '%'.$query.'%', 'LIKE'), 'OR');
104 104
         }
105 105
     }
106 106
     $contentArray = $contentsHandler->getAll($criteria, $contentFields, false);
107 107
     foreach ($contentArray as $content) {
108 108
         $ret[] = [
109 109
             'image' => 'assets/images/question2.gif',
110
-            'link'  => $helper->url('index.php?cat_id=' . $content['contents_cid'] . '#q' . $content['contents_id']),
110
+            'link'  => $helper->url('index.php?cat_id='.$content['contents_cid'].'#q'.$content['contents_id']),
111 111
             'title' => $content['contents_title'],
112 112
             'time'  => $content['contents_publish'],
113 113
         ];
Please login to merge, or discard this patch.
blocks/xoopsfaq_category.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -68,14 +68,14 @@  discard block
 block discarded – undo
68 68
         $faqCountArray   = $contentsHandler->getCategoriesIdsWithContent();
69 69
         if (is_array($faqCountArray) && !empty($faqCountArray)) {
70 70
             $catsToShow = array_intersect($catsToUse, array_keys($faqCountArray));
71
-            $criteria->add(new \Criteria('category_id', '(' . implode(',', $catsToShow) . ')', 'IN'));
71
+            $criteria->add(new \Criteria('category_id', '('.implode(',', $catsToShow).')', 'IN'));
72 72
         } else {
73 73
             // there are no categories to show
74 74
             return $block;
75 75
         }
76 76
         unset($contentsHandler, $faqCountArray, $catsToShow);
77 77
     } else {
78
-        $criteria->add(new \Criteria('category_id', '(' . implode(',', $catsToUse) . ')', 'IN'));
78
+        $criteria->add(new \Criteria('category_id', '('.implode(',', $catsToUse).')', 'IN'));
79 79
     }
80 80
     $fieldsArray = ['category_id', 'category_title'];
81 81
     $catObjArray = $categoryHandler->getAll($criteria, $fieldsArray);
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
         foreach ($catObjArray as $cId => $catObj) {
86 86
             $block['cat'][] = [
87 87
                 'title' => $myts->displayTarea($catObj->getVar('category_title')),
88
-                'link'  => $helper->url('index.php?cat_id=' . $cId),
88
+                'link'  => $helper->url('index.php?cat_id='.$cId),
89 89
             ];
90 90
         }
91 91
     }
Please login to merge, or discard this patch.
blocks/xoopsfaq_recent.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -70,7 +70,7 @@
 block discarded – undo
70 70
         }
71 71
     }
72 72
     if (!empty($catsToUse)) {
73
-        $criteria->add(new \Criteria('contents_cid', '(' . implode(',', $catsToUse) . ')', 'IN'));
73
+        $criteria->add(new \Criteria('contents_cid', '('.implode(',', $catsToUse).')', 'IN'));
74 74
     } else {
75 75
         return $block;
76 76
     }
Please login to merge, or discard this patch.
blocks/xoopsfaq_rand.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
         }
66 66
     }
67 67
     if (!empty($catsToUse)) {
68
-        $criteria->add(new \Criteria('contents_cid', '(' . implode(',', $catsToUse) . ')', 'IN'));
68
+        $criteria->add(new \Criteria('contents_cid', '('.implode(',', $catsToUse).')', 'IN'));
69 69
     } else {
70 70
         return $block;
71 71
     }
@@ -86,9 +86,9 @@  discard block
 block discarded – undo
86 86
             'title'    => _MB_XOOPSFAQ_RANDOM_TITLE,
87 87
             'faq'      => $faq,
88 88
             'faqans'   => $faqAns,
89
-            'morelink' => $helper->url('index.php?cat_id=' . $cid . '#q' . $xpFaqObj->getVar('contents_id')),
89
+            'morelink' => $helper->url('index.php?cat_id='.$cid.'#q'.$xpFaqObj->getVar('contents_id')),
90 90
             'linktxt'  => _MB_XOOPSFAQ_SEE_MORE,
91
-            'catlink'  => $helper->url('index.php?cat_id=' . $cid),
91
+            'catlink'  => $helper->url('index.php?cat_id='.$cid),
92 92
             'cattxt'   => $catObj->getVar('category_title'),
93 93
         ];
94 94
         unset($xpFaqObj, $catObj);
@@ -122,6 +122,6 @@  discard block
 block discarded – undo
122 122
     $formSelect->setValue($selOptions);
123 123
     $selectCat = $formSelect->render();
124 124
 
125
-    $form = '<div class="line140">' . _MB_XOOPSFAQ_CHARS . '&nbsp;' . '<input type="number" name="options[0]" value="' . $options[0] . '" style="width: 5em;" min="0" class="right">&nbsp;' . _MB_XOOPSFAQ_LENGTH . '<br><br>' . _MB_XOOPSFAQ_ALL_CATS_INTRO . '&nbsp;&nbsp;' . $selectCat . '</div>';
125
+    $form = '<div class="line140">'._MB_XOOPSFAQ_CHARS.'&nbsp;'.'<input type="number" name="options[0]" value="'.$options[0].'" style="width: 5em;" min="0" class="right">&nbsp;'._MB_XOOPSFAQ_LENGTH.'<br><br>'._MB_XOOPSFAQ_ALL_CATS_INTRO.'&nbsp;&nbsp;'.$selectCat.'</div>';
126 126
     return $form;
127 127
 }
Please login to merge, or discard this patch.
class/Common/Configurator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@
 block discarded – undo
45 45
         $moduleDirName      = basename(dirname(dirname(__DIR__)));
46 46
         $moduleDirNameUpper = mb_strtoupper($moduleDirName);
47 47
 
48
-        $config = include dirname(dirname(__DIR__)) . '/config/config.php';
48
+        $config = include dirname(dirname(__DIR__)).'/config/config.php';
49 49
 
50 50
         $this->name            = $config->name;
51 51
         $this->paths           = $config->paths;
Please login to merge, or discard this patch.
class/Common/FilesManagement.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
                     throw new \RuntimeException(sprintf('Unable to create the %s directory', $folder));
36 36
                 }
37 37
 
38
-                file_put_contents($folder . '/index.html', '<script>history.go(-1);</script>');
38
+                file_put_contents($folder.'/index.html', '<script>history.go(-1);</script>');
39 39
             }
40 40
         } catch (\Exception $e) {
41 41
             echo 'Caught exception: ', $e->getMessage(), '<br>';
@@ -61,14 +61,14 @@  discard block
 block discarded – undo
61 61
         $dir = opendir($src);
62 62
         //        @mkdir($dst);
63 63
         if (!@mkdir($dst) && !is_dir($dst)) {
64
-            throw new \RuntimeException('The directory ' . $dst . ' could not be created.');
64
+            throw new \RuntimeException('The directory '.$dst.' could not be created.');
65 65
         }
66 66
         while (false !== ($file = readdir($dir))) {
67 67
             if (('.' !== $file) && ('..' !== $file)) {
68
-                if (is_dir($src . '/' . $file)) {
69
-                    self::recurseCopy($src . '/' . $file, $dst . '/' . $file);
68
+                if (is_dir($src.'/'.$file)) {
69
+                    self::recurseCopy($src.'/'.$file, $dst.'/'.$file);
70 70
                 } else {
71
-                    copy($src . '/' . $file, $dst . '/' . $file);
71
+                    copy($src.'/'.$file, $dst.'/'.$file);
72 72
                 }
73 73
             }
74 74
         }
@@ -204,7 +204,7 @@  discard block
 block discarded – undo
204 204
                 self::rrmdir($fObj->getPathname());
205 205
             }
206 206
         }
207
-        $iterator = null;   // clear iterator Obj to close file/directory
207
+        $iterator = null; // clear iterator Obj to close file/directory
208 208
         return rmdir($src); // remove the directory & return results
209 209
     }
210 210
 
@@ -237,14 +237,14 @@  discard block
 block discarded – undo
237 237
         $iterator = new \DirectoryIterator($src);
238 238
         foreach ($iterator as $fObj) {
239 239
             if ($fObj->isFile()) {
240
-                rename($fObj->getPathname(), "{$dest}/" . $fObj->getFilename());
240
+                rename($fObj->getPathname(), "{$dest}/".$fObj->getFilename());
241 241
             } elseif (!$fObj->isDot() && $fObj->isDir()) {
242 242
                 // Try recursively on directory
243
-                self::rmove($fObj->getPathname(), "{$dest}/" . $fObj->getFilename());
243
+                self::rmove($fObj->getPathname(), "{$dest}/".$fObj->getFilename());
244 244
                 //                rmdir($fObj->getPath()); // now delete the directory
245 245
             }
246 246
         }
247
-        $iterator = null;   // clear iterator Obj to close file/directory
247
+        $iterator = null; // clear iterator Obj to close file/directory
248 248
         return rmdir($src); // remove the directory & return results
249 249
     }
250 250
 
@@ -280,9 +280,9 @@  discard block
 block discarded – undo
280 280
         $iterator = new \DirectoryIterator($src);
281 281
         foreach ($iterator as $fObj) {
282 282
             if ($fObj->isFile()) {
283
-                copy($fObj->getPathname(), "{$dest}/" . $fObj->getFilename());
283
+                copy($fObj->getPathname(), "{$dest}/".$fObj->getFilename());
284 284
             } elseif (!$fObj->isDot() && $fObj->isDir()) {
285
-                self::rcopy($fObj->getPathname(), "{$dest}/" . $fObj->getFilename());
285
+                self::rcopy($fObj->getPathname(), "{$dest}/".$fObj->getFilename());
286 286
             }
287 287
         }
288 288
 
Please login to merge, or discard this patch.