Test Failed
Pull Request — master (#592)
by Lucio
10:17
created
htdocs/modules/protector/index.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,14 +1,14 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-require dirname(dirname(__DIR__)) . '/mainfile.php';
3
+require dirname(dirname(__DIR__)).'/mainfile.php';
4 4
 defined('XOOPS_TRUST_PATH') || exit('set XOOPS_TRUST_PATH in mainfile.php');
5 5
 
6 6
 $mydirname = basename(__DIR__);
7 7
 $mydirpath = __DIR__;
8
-require $mydirpath . '/mytrustdirname.php'; // set $mytrustdirname
8
+require $mydirpath.'/mytrustdirname.php'; // set $mytrustdirname
9 9
 
10 10
 if (@$_GET['mode'] === 'admin') {
11
-    require XOOPS_TRUST_PATH . '/modules/' . $mytrustdirname . '/admin.php';
11
+    require XOOPS_TRUST_PATH.'/modules/'.$mytrustdirname.'/admin.php';
12 12
 } else {
13
-    require XOOPS_TRUST_PATH . '/modules/' . $mytrustdirname . '/main.php';
13
+    require XOOPS_TRUST_PATH.'/modules/'.$mytrustdirname.'/main.php';
14 14
 }
Please login to merge, or discard this patch.
htdocs/modules/protector/module_icon.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,12 +1,12 @@
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 $xoopsOption['nocommon'] = true;
4
-require dirname(dirname(__DIR__)) . '/mainfile.php';
4
+require dirname(dirname(__DIR__)).'/mainfile.php';
5 5
 
6 6
 defined('XOOPS_TRUST_PATH') || exit('set XOOPS_TRUST_PATH in mainfile.php');
7 7
 
8 8
 $mydirname = basename(__DIR__);
9 9
 $mydirpath = __DIR__;
10
-require $mydirpath . '/mytrustdirname.php'; // set $mytrustdirname
10
+require $mydirpath.'/mytrustdirname.php'; // set $mytrustdirname
11 11
 
12
-require XOOPS_TRUST_PATH . '/modules/' . $mytrustdirname . '/module_icon.php';
12
+require XOOPS_TRUST_PATH.'/modules/'.$mytrustdirname.'/module_icon.php';
Please login to merge, or discard this patch.
htdocs/modules/protector/notification.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -4,6 +4,6 @@
 block discarded – undo
4 4
 
5 5
 $mydirname = basename(__DIR__);
6 6
 $mydirpath = __DIR__;
7
-require $mydirpath . '/mytrustdirname.php'; // set $mytrustdirname
7
+require $mydirpath.'/mytrustdirname.php'; // set $mytrustdirname
8 8
 
9
-require XOOPS_TRUST_PATH . '/modules/' . $mytrustdirname . '/notification.php';
9
+require XOOPS_TRUST_PATH.'/modules/'.$mytrustdirname.'/notification.php';
Please login to merge, or discard this patch.
htdocs/modules/protector/blocks/blocks.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -4,6 +4,6 @@
 block discarded – undo
4 4
 
5 5
 $mydirname = basename(dirname(__DIR__));
6 6
 $mydirpath = dirname(__DIR__);
7
-require $mydirpath . '/mytrustdirname.php'; // set $mytrustdirname
7
+require $mydirpath.'/mytrustdirname.php'; // set $mytrustdirname
8 8
 
9
-require XOOPS_TRUST_PATH . '/modules/' . $mytrustdirname . '/blocks.php';
9
+require XOOPS_TRUST_PATH.'/modules/'.$mytrustdirname.'/blocks.php';
Please login to merge, or discard this patch.
htdocs/modules/protector/notification_update.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,13 +1,13 @@
 block discarded – undo
1 1
 <?php
2
-require dirname(dirname(__DIR__)) . '/mainfile.php';
2
+require dirname(dirname(__DIR__)).'/mainfile.php';
3 3
 defined('XOOPS_TRUST_PATH') || exit('set XOOPS_TRUST_PATH in mainfile.php');
4 4
 
5 5
 $mydirname = basename(__DIR__);
6 6
 $mydirpath = __DIR__;
7
-$mydirurl  = XOOPS_URL . '/modules/' . $mydirname;
7
+$mydirurl  = XOOPS_URL.'/modules/'.$mydirname;
8 8
 
9
-require $mydirpath . '/mytrustdirname.php'; // set $mytrustdirname
9
+require $mydirpath.'/mytrustdirname.php'; // set $mytrustdirname
10 10
 
11 11
 $_GET['page'] = basename(__FILE__, '.php');
12 12
 
13
-require XOOPS_TRUST_PATH . '/modules/' . $mytrustdirname . '/main.php';
13
+require XOOPS_TRUST_PATH.'/modules/'.$mytrustdirname.'/main.php';
Please login to merge, or discard this patch.
htdocs/modules/protector/onuninstall.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -4,6 +4,6 @@
 block discarded – undo
4 4
 
5 5
 $mydirname = basename(__DIR__);
6 6
 $mydirpath = __DIR__;
7
-require $mydirpath . '/mytrustdirname.php'; // set $mytrustdirname
7
+require $mydirpath.'/mytrustdirname.php'; // set $mytrustdirname
8 8
 
9
-require XOOPS_TRUST_PATH . '/modules/' . $mytrustdirname . '/onuninstall.php';
9
+require XOOPS_TRUST_PATH.'/modules/'.$mytrustdirname.'/onuninstall.php';
Please login to merge, or discard this patch.
htdocs/modules/protector/admin/admin_menu.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -2,8 +2,8 @@
 block discarded – undo
2 2
 
3 3
 defined('XOOPS_TRUST_PATH') || exit('set XOOPS_TRUST_PATH in mainfile.php');
4 4
 
5
-$mydirname = basename( dirname(__DIR__) ) ;
6
-$mydirpath = dirname(__DIR__) ;
7
-require $mydirpath.'/mytrustdirname.php' ; // set $mytrustdirname
5
+$mydirname = basename(dirname(__DIR__));
6
+$mydirpath = dirname(__DIR__);
7
+require $mydirpath.'/mytrustdirname.php'; // set $mytrustdirname
8 8
 
9
-require XOOPS_TRUST_PATH.'/modules/'.$mytrustdirname.'/admin_menu.php' ;
9
+require XOOPS_TRUST_PATH.'/modules/'.$mytrustdirname.'/admin_menu.php';
Please login to merge, or discard this patch.
htdocs/modules/protector/admin/about.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,10 +1,10 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-require dirname(dirname(dirname(__DIR__))) . '/mainfile.php';
3
+require dirname(dirname(dirname(__DIR__))).'/mainfile.php';
4 4
 defined('XOOPS_TRUST_PATH') || exit('set XOOPS_TRUST_PATH in mainfile.php');
5 5
 
6
-$mydirname = basename( dirname(__DIR__) ) ;
7
-$mydirpath = dirname(__DIR__) ;
8
-require $mydirpath.'/mytrustdirname.php' ; // set $mytrustdirname
6
+$mydirname = basename(dirname(__DIR__));
7
+$mydirpath = dirname(__DIR__);
8
+require $mydirpath.'/mytrustdirname.php'; // set $mytrustdirname
9 9
 
10
-require XOOPS_TRUST_PATH.'/modules/'.$mytrustdirname.'/admin/about.php' ;
10
+require XOOPS_TRUST_PATH.'/modules/'.$mytrustdirname.'/admin/about.php';
Please login to merge, or discard this patch.
htdocs/modules/protector/admin/stats.php 1 patch
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -10,10 +10,10 @@  discard block
 block discarded – undo
10 10
  * @package    gwiki
11 11
  */
12 12
 
13
-include __DIR__ . '/../../../mainfile.php';
14
-$mydirname = basename( dirname(__DIR__) ) ;
15
-$mydirpath = dirname(__DIR__) ;
16
-require $mydirpath.'/mytrustdirname.php' ; // set $mytrustdirname
13
+include __DIR__.'/../../../mainfile.php';
14
+$mydirname = basename(dirname(__DIR__));
15
+$mydirpath = dirname(__DIR__);
16
+require $mydirpath.'/mytrustdirname.php'; // set $mytrustdirname
17 17
 
18 18
 require XOOPS_TRUST_PATH.'/modules/'.$mytrustdirname.'/admin/admin_header.php';
19 19
 
@@ -27,23 +27,23 @@  discard block
 block discarded – undo
27 27
         $string .= (!$firstTime) ? ', ' : '';
28 28
         $firstTime = false;
29 29
         $wrap = ($wrap === null) ? ((is_int($value)) ? '' : '\'') : $wrap;
30
-        $string .= $wrap . $value . $wrap;
30
+        $string .= $wrap.$value.$wrap;
31 31
     }
32 32
     $string .= ']';
33 33
     return $string;
34 34
 }
35 35
 
36
-$queryFormat = "SELECT `type`, '%s' as age, COUNT(*) as count FROM `" . $xoopsDB->prefix($mydirname . "_log")
36
+$queryFormat = "SELECT `type`, '%s' as age, COUNT(*) as count FROM `".$xoopsDB->prefix($mydirname."_log")
37 37
     . "` WHERE `timestamp` > NOW() - INTERVAL %d SECOND GROUP BY `type`, 2 ";
38 38
 
39 39
 $sql = '';
40
-$sql .= sprintf($queryFormat, 'month', 30*24*60*60);
40
+$sql .= sprintf($queryFormat, 'month', 30 * 24 * 60 * 60);
41 41
 $sql .= 'UNION ALL ';
42
-$sql .= sprintf($queryFormat, 'week', 7*24*60*60);
42
+$sql .= sprintf($queryFormat, 'week', 7 * 24 * 60 * 60);
43 43
 $sql .= 'UNION ALL ';
44
-$sql .= sprintf($queryFormat, 'day', 24*60*60);
44
+$sql .= sprintf($queryFormat, 'day', 24 * 60 * 60);
45 45
 $sql .= 'UNION ALL ';
46
-$sql .= sprintf($queryFormat, 'hour', 60*60);
46
+$sql .= sprintf($queryFormat, 'hour', 60 * 60);
47 47
 
48 48
 $rawStats = array();
49 49
 $rawStats['']['month'] = 0;
@@ -74,17 +74,17 @@  discard block
 block discarded – undo
74 74
 //
75 75
 // http://gionkunz.github.io/chartist-js/examples.html#example-bar-horizontal
76 76
 $script = "new Chartist.Bar('.ct-chart', {\n";
77
-$script .= '  labels: ' . dumpArray(array_keys($stats)) . ",\n";
77
+$script .= '  labels: '.dumpArray(array_keys($stats)).",\n";
78 78
 $script .= '  series: ';
79 79
 $allSets = [];
80
-for ($i=0; $i<4; ++$i) {
80
+for ($i = 0; $i < 4; ++$i) {
81 81
     $newSet = [];
82 82
     foreach ($stats as $set) {
83
-        $newSet[] = $set[$i] - (($i<3) ? $set[$i+1] : 0);
83
+        $newSet[] = $set[$i] - (($i < 3) ? $set[$i + 1] : 0);
84 84
     }
85 85
     $allSets[] = dumpArray($newSet);
86 86
 }
87
-$series = dumpArray(array_reverse($allSets), '') . "\n";
87
+$series = dumpArray(array_reverse($allSets), '')."\n";
88 88
 $script .= $series;
89 89
 //Xmf\Debug::dump($stats, $series);
90 90
 
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
 $GLOBALS['xoTheme']->addStylesheet('modules/protector/assets/css/chartist.min.css');
111 111
 $GLOBALS['xoTheme']->addScript('modules/protector/assets/js/chartist.min.js');
112 112
 $GLOBALS['xoTheme']->addScript('', [], $script);
113
-$styles =<<<EOSS
113
+$styles = <<<EOSS
114 114
 .ct-series-a .ct-bar { stroke: grey; }
115 115
 .ct-series-b .ct-bar { stroke: orange; }
116 116
 .ct-series-c .ct-bar { stroke: yellow; }
@@ -135,9 +135,9 @@  discard block
 block discarded – undo
135 135
 
136 136
 $moduleAdmin->displayNavigation(basename(__FILE__));
137 137
 
138
-echo '<h3>' . _AM_ADMINSTATS_TITLE . '</h3>';
138
+echo '<h3>'._AM_ADMINSTATS_TITLE.'</h3>';
139 139
 echo '<div class="ct-chart xct-minor-seventh"></div>';
140
-echo '<script>'. $script .'</script>';
140
+echo '<script>'.$script.'</script>';
141 141
 
142 142
 echo '<div class="right">'
143 143
     . '<div class="colorkeys color-series-a">&nbsp;&nbsp;&nbsp;</div><span>Last Month </span>'
Please login to merge, or discard this patch.