Passed
Push — master ( d2520f...3f8ec2 )
by Michael
02:50
created
header.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -19,20 +19,20 @@
 block discarded – undo
19 19
 
20 20
 use XoopsModules\Extcal;
21 21
 
22
-include XOOPS_ROOT_PATH . '/header.php';
22
+include XOOPS_ROOT_PATH.'/header.php';
23 23
 
24
-require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php';
24
+require_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php';
25 25
 
26
-require_once __DIR__ . '/include/agenda_fnc.php';
26
+require_once __DIR__.'/include/agenda_fnc.php';
27 27
 
28 28
 Extcal\Helper::getInstance()->loadLanguage('modinfo');
29 29
 
30 30
 //------------------------------------------------------
31
-require_once _EXTCAL_PEAR_CALENDAR_ROOT . '/Util/Textual.php';
32
-require_once _EXTCAL_PEAR_CALENDAR_ROOT . '/Month/Weeks.php';
33
-require_once _EXTCAL_PEAR_CALENDAR_ROOT . '/Month/Weekdays.php';
34
-require_once _EXTCAL_PEAR_CALENDAR_ROOT . '/Week.php';
35
-require_once _EXTCAL_PEAR_CALENDAR_ROOT . '/Day.php';
31
+require_once _EXTCAL_PEAR_CALENDAR_ROOT.'/Util/Textual.php';
32
+require_once _EXTCAL_PEAR_CALENDAR_ROOT.'/Month/Weeks.php';
33
+require_once _EXTCAL_PEAR_CALENDAR_ROOT.'/Month/Weekdays.php';
34
+require_once _EXTCAL_PEAR_CALENDAR_ROOT.'/Week.php';
35
+require_once _EXTCAL_PEAR_CALENDAR_ROOT.'/Day.php';
36 36
 
37 37
 //------------------------------------------------------
38 38
 // Getting eXtCal object's handler
Please login to merge, or discard this patch.
comment_new.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -17,14 +17,14 @@
 block discarded – undo
17 17
  * @author       XOOPS Development Team,
18 18
  */
19 19
 
20
-include __DIR__ . '/../../mainfile.php';
21
-$com_itemid = isset($_GET['com_itemid']) ? (int)$_GET['com_itemid'] : 0;
20
+include __DIR__.'/../../mainfile.php';
21
+$com_itemid = isset($_GET['com_itemid']) ? (int) $_GET['com_itemid'] : 0;
22 22
 if ($com_itemid > 0) {
23 23
     // Get link title
24
-    $sql            = 'SELECT event_title, event_desc FROM ' . $xoopsDB->prefix('extcal_event') . ' WHERE event_id=' . $com_itemid . ' ';
24
+    $sql            = 'SELECT event_title, event_desc FROM '.$xoopsDB->prefix('extcal_event').' WHERE event_id='.$com_itemid.' ';
25 25
     $result         = $xoopsDB->query($sql);
26 26
     $row            = $xoopsDB->fetchArray($result);
27 27
     $com_replytitle = $row['event_title'];
28 28
     $com_replytext  = $row['event_desc'];
29
-    include XOOPS_ROOT_PATH . '/include/comment_new.php';
29
+    include XOOPS_ROOT_PATH.'/include/comment_new.php';
30 30
 }
Please login to merge, or discard this patch.
download_attachement.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -2,20 +2,20 @@
 block discarded – undo
2 2
 
3 3
 use XoopsModules\Extcal;
4 4
 
5
-include __DIR__ . '/../../mainfile.php';
6
-require_once __DIR__ . '/include/constantes.php';
5
+include __DIR__.'/../../mainfile.php';
6
+require_once __DIR__.'/include/constantes.php';
7 7
 
8 8
 if (!isset($_GET['file'])) {
9 9
     $fileId = 0;
10 10
 } else {
11
-    $fileId = (int)$_GET['file'];
11
+    $fileId = (int) $_GET['file'];
12 12
 }
13 13
 /** @var Extcal\FileHandler $fileHandler */
14 14
 $fileHandler = Extcal\Helper::getInstance()->getHandler(_EXTCAL_CLN_FILE);
15 15
 
16 16
 $file = $fileHandler->getFile($fileId);
17 17
 
18
-header('Content-Type: ' . $file->getVar('file_mimetype') . '');
19
-header('Content-Disposition: attachment; filename="' . $file->getVar('file_nicename') . '"');
18
+header('Content-Type: '.$file->getVar('file_mimetype').'');
19
+header('Content-Disposition: attachment; filename="'.$file->getVar('file_nicename').'"');
20 20
 
21
-readfile(XOOPS_ROOT_PATH . '/uploads/extcal/' . $file->getVar('file_name'));
21
+readfile(XOOPS_ROOT_PATH.'/uploads/extcal/'.$file->getVar('file_name'));
Please login to merge, or discard this patch.
view_month.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -2,16 +2,16 @@  discard block
 block discarded – undo
2 2
 
3 3
 use XoopsModules\Extcal;
4 4
 
5
-include __DIR__ . '/../../mainfile.php';
6
-require_once __DIR__ . '/include/constantes.php';
5
+include __DIR__.'/../../mainfile.php';
6
+require_once __DIR__.'/include/constantes.php';
7 7
 $params                                  = ['view' => _EXTCAL_NAV_MONTH, 'file' => _EXTCAL_FILE_MONTH];
8 8
 $GLOBALS['xoopsOption']['template_main'] = "extcal_view_{$params['view']}.tpl";
9
-require_once __DIR__ . '/header.php';
9
+require_once __DIR__.'/header.php';
10 10
 
11 11
 /* ========================================================================== */
12
-$year  = isset($_GET['year']) ? (int)$_GET['year'] : date('Y');
13
-$month = isset($_GET['month']) ? (int)$_GET['month'] : date('n');
14
-$cat   = isset($_GET['cat']) ? (int)$_GET['cat'] : 0;
12
+$year  = isset($_GET['year']) ? (int) $_GET['year'] : date('Y');
13
+$month = isset($_GET['month']) ? (int) $_GET['month'] : date('n');
14
+$cat   = isset($_GET['cat']) ? (int) $_GET['cat'] : 0;
15 15
 /* ========================================================================== */
16 16
 
17 17
 $form = new \XoopsSimpleForm('', 'navigSelectBox', $params['file'], 'get');
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
     'cat'          => $cat,
34 34
     'externalKeys' => 'cat_id',
35 35
 ];
36
-$events   = $eventHandler->getEventsOnPeriode($criteres);
36
+$events = $eventHandler->getEventsOnPeriode($criteres);
37 37
 /**********************************************************************/
38 38
 $eventsArray = $events;
39 39
 
@@ -90,21 +90,21 @@  discard block
 block discarded – undo
90 90
 $nMonthCalObj = $monthCalObj->nextMonth('object');
91 91
 $navig        = [
92 92
     'prev' => [
93
-        'uri'  => 'year=' . $pMonthCalObj->thisYear() . '&month=' . $pMonthCalObj->thisMonth(),
93
+        'uri'  => 'year='.$pMonthCalObj->thisYear().'&month='.$pMonthCalObj->thisMonth(),
94 94
         'name' => $timeHandler->getFormatedDate($xoopsModuleConfig['nav_date_month'], $pMonthCalObj->getTimestamp()),
95 95
     ],
96 96
     'this' => [
97
-        'uri'  => 'year=' . $monthCalObj->thisYear() . '&month=' . $monthCalObj->thisMonth(),
97
+        'uri'  => 'year='.$monthCalObj->thisYear().'&month='.$monthCalObj->thisMonth(),
98 98
         'name' => $timeHandler->getFormatedDate($xoopsModuleConfig['nav_date_month'], $monthCalObj->getTimestamp()),
99 99
     ],
100 100
     'next' => [
101
-        'uri'  => 'year=' . $nMonthCalObj->thisYear() . '&month=' . $nMonthCalObj->thisMonth(),
101
+        'uri'  => 'year='.$nMonthCalObj->thisYear().'&month='.$nMonthCalObj->thisMonth(),
102 102
         'name' => $timeHandler->getFormatedDate($xoopsModuleConfig['nav_date_month'], $nMonthCalObj->getTimestamp()),
103 103
     ],
104 104
 ];
105 105
 
106 106
 // Title of the page
107
-$xoopsTpl->assign('xoops_pagetitle', $xoopsModule->getVar('name') . ' ' . $navig['this']['name']);
107
+$xoopsTpl->assign('xoops_pagetitle', $xoopsModule->getVar('name').' '.$navig['this']['name']);
108 108
 
109 109
 // Assigning navig data to the template
110 110
 $xoopsTpl->assign('navig', $navig);
@@ -161,4 +161,4 @@  discard block
 block discarded – undo
161 161
 $xoopsTpl->assign('lang', $lang);
162 162
 $xoopsTpl->assign('view', 'month');
163 163
 
164
-include XOOPS_ROOT_PATH . '/footer.php';
164
+include XOOPS_ROOT_PATH.'/footer.php';
Please login to merge, or discard this patch.
view_year.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -19,15 +19,15 @@  discard block
 block discarded – undo
19 19
 
20 20
 use XoopsModules\Extcal;
21 21
 
22
-include __DIR__ . '/../../mainfile.php';
23
-require_once __DIR__ . '/include/constantes.php';
22
+include __DIR__.'/../../mainfile.php';
23
+require_once __DIR__.'/include/constantes.php';
24 24
 $params                                  = ['view' => _EXTCAL_NAV_YEAR, 'file' => _EXTCAL_FILE_YEAR];
25 25
 $GLOBALS['xoopsOption']['template_main'] = "extcal_view_{$params['view']}.tpl";
26
-require_once __DIR__ . '/header.php';
26
+require_once __DIR__.'/header.php';
27 27
 
28 28
 /* ========================================================================== */
29
-$year = isset($_GET['year']) ? (int)$_GET['year'] : date('Y');
30
-$cat  = isset($_GET['cat']) ? (int)$_GET['cat'] : 0;
29
+$year = isset($_GET['year']) ? (int) $_GET['year'] : date('Y');
30
+$cat  = isset($_GET['cat']) ? (int) $_GET['cat'] : 0;
31 31
 
32 32
 // Getting eXtCal object's handler
33 33
 $catHandler   = Extcal\Helper::getInstance()->getHandler(_EXTCAL_CLN_CAT);
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
     'cat'          => $cat,
57 57
     'externalKeys' => 'cat_id',
58 58
 ];
59
-$events   = $eventHandler->getEventsOnPeriode($criteres);
59
+$events = $eventHandler->getEventsOnPeriode($criteres);
60 60
 /**********************************************************************/
61 61
 $eventsArray = $events;
62 62
 // Formating date
@@ -100,21 +100,21 @@  discard block
 block discarded – undo
100 100
 // Making navig data
101 101
 $navig = [
102 102
     'prev' => [
103
-        'uri'  => 'year=' . $prevYear,
103
+        'uri'  => 'year='.$prevYear,
104 104
         'name' => $prevYear,
105 105
     ],
106 106
     'this' => [
107
-        'uri'  => 'year=' . $year,
107
+        'uri'  => 'year='.$year,
108 108
         'name' => $year,
109 109
     ],
110 110
     'next' => [
111
-        'uri'  => 'year=' . $nexYear,
111
+        'uri'  => 'year='.$nexYear,
112 112
         'name' => $nexYear,
113 113
     ],
114 114
 ];
115 115
 
116 116
 // Title of the page
117
-$xoopsTpl->assign('xoops_pagetitle', $xoopsModule->getVar('name') . ' ' . $navig['this']['name']);
117
+$xoopsTpl->assign('xoops_pagetitle', $xoopsModule->getVar('name').' '.$navig['this']['name']);
118 118
 
119 119
 // Assigning navig data to the template
120 120
 $xoopsTpl->assign('navig', $navig);
@@ -168,4 +168,4 @@  discard block
 block discarded – undo
168 168
 $xoopsTpl->assign('lang', $lang);
169 169
 $xoopsTpl->assign('view', 'year');
170 170
 
171
-include XOOPS_ROOT_PATH . '/footer.php';
171
+include XOOPS_ROOT_PATH.'/footer.php';
Please login to merge, or discard this patch.
rss.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -2,17 +2,17 @@  discard block
 block discarded – undo
2 2
 
3 3
 use XoopsModules\Extcal;
4 4
 
5
-include __DIR__ . '/../../mainfile.php';
6
-require_once __DIR__ . '/include/constantes.php';
7
-require_once __DIR__ . '/header.php';
5
+include __DIR__.'/../../mainfile.php';
6
+require_once __DIR__.'/include/constantes.php';
7
+require_once __DIR__.'/header.php';
8 8
 
9
-require_once XOOPS_ROOT_PATH . '/class/template.php';
9
+require_once XOOPS_ROOT_PATH.'/class/template.php';
10 10
 /** @var Extcal\EventHandler $eventHandler */
11 11
 $eventHandler = Extcal\Helper::getInstance()->getHandler(_EXTCAL_CLN_EVENT);
12 12
 if (!isset($_GET['cat'])) {
13 13
     $cat = 0;
14 14
 } else {
15
-    $cat = (int)$_GET['cat'];
15
+    $cat = (int) $_GET['cat'];
16 16
 }
17 17
 if (function_exists('mb_http_output')) {
18 18
     mb_http_output('pass');
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
     $events = $eventHandler->getUpcommingEvent($xoopsModuleConfig['rss_nb_event'], $cat);
26 26
     if (is_array($events)) {
27 27
         $tpl->assign('channel_title', xoops_utf8_encode(htmlspecialchars($xoopsConfig['sitename'], ENT_QUOTES)));
28
-        $tpl->assign('channel_link', XOOPS_URL . '/');
28
+        $tpl->assign('channel_link', XOOPS_URL.'/');
29 29
         $tpl->assign('channel_desc', xoops_utf8_encode(htmlspecialchars($xoopsConfig['slogan'], ENT_QUOTES)));
30 30
         $tpl->assign('channel_lastbuild', formatTimestamp(time(), 'rss'));
31 31
         $tpl->assign('channel_webmaster', $xoopsConfig['adminmail']);
@@ -33,14 +33,14 @@  discard block
 block discarded – undo
33 33
         $tpl->assign('channel_category', 'Event');
34 34
         $tpl->assign('channel_generator', 'XOOPS');
35 35
         $tpl->assign('channel_language', _LANGCODE);
36
-        $tpl->assign('image_url', XOOPS_URL . '/modules/extcal/assets/images/extcal_logo.png');
36
+        $tpl->assign('image_url', XOOPS_URL.'/modules/extcal/assets/images/extcal_logo.png');
37 37
         $tpl->assign('image_width', 92);
38 38
         $tpl->assign('image_height', 52);
39 39
         foreach ($events as $event) {
40 40
             $tpl->append('items', [
41 41
                 'title'       => xoops_utf8_encode(htmlspecialchars($event->getVar('event_title'), ENT_QUOTES)),
42
-                'link'        => XOOPS_URL . '/modules/extcal/event.php?event=' . $event->getVar('event_id'),
43
-                'guid'        => XOOPS_URL . '/modules/extcal/event.php?event=' . $event->getVar('event_id'),
42
+                'link'        => XOOPS_URL.'/modules/extcal/event.php?event='.$event->getVar('event_id'),
43
+                'guid'        => XOOPS_URL.'/modules/extcal/event.php?event='.$event->getVar('event_id'),
44 44
                 'pubdate'     => formatTimestamp($event->getVar('event_start'), 'rss'),
45 45
                 'description' => xoops_utf8_encode(htmlspecialchars($event->getVar('event_desc'), ENT_QUOTES)),
46 46
             ]);
Please login to merge, or discard this patch.
preloads/autoloader.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -3,12 +3,12 @@  discard block
 block discarded – undo
3 3
 /**
4 4
  * @see http://www.php-fig.org/psr/psr-4/examples/
5 5
  */
6
-spl_autoload_register(function ($class) {
6
+spl_autoload_register(function($class) {
7 7
     // project-specific namespace prefix
8
-    $prefix = 'XoopsModules\\' . ucfirst(basename(dirname(__DIR__)));
8
+    $prefix = 'XoopsModules\\'.ucfirst(basename(dirname(__DIR__)));
9 9
 
10 10
     // base directory for the namespace prefix
11
-    $base_dir = __DIR__ . '/../class/';
11
+    $base_dir = __DIR__.'/../class/';
12 12
 
13 13
     // does the class use the namespace prefix?
14 14
     $len = strlen($prefix);
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
     // replace the namespace prefix with the base directory, replace namespace
24 24
     // separators with directory separators in the relative class name, append
25 25
     // with .php
26
-    $file = $base_dir . str_replace('\\', '/', $relative_class) . '.php';
26
+    $file = $base_dir.str_replace('\\', '/', $relative_class).'.php';
27 27
 
28 28
     // if the file exists, require it
29 29
     if (file_exists($file)) {
Please login to merge, or discard this patch.
view_week.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -19,17 +19,17 @@  discard block
 block discarded – undo
19 19
  * @author       XOOPS Development Team,
20 20
  */
21 21
 
22
-include __DIR__ . '/../../mainfile.php';
23
-require_once __DIR__ . '/include/constantes.php';
22
+include __DIR__.'/../../mainfile.php';
23
+require_once __DIR__.'/include/constantes.php';
24 24
 $params                                  = ['view' => _EXTCAL_NAV_WEEK, 'file' => _EXTCAL_FILE_WEEK];
25 25
 $GLOBALS['xoopsOption']['template_main'] = "extcal_view_{$params['view']}.tpl";
26
-require_once __DIR__ . '/header.php';
26
+require_once __DIR__.'/header.php';
27 27
 
28 28
 /* ========================================================================== */
29
-$year  = isset($_GET['year']) ? (int)$_GET['year'] : date('Y');
30
-$month = isset($_GET['month']) ? (int)$_GET['month'] : date('n');
31
-$day   = isset($_GET['day']) ? (int)$_GET['day'] : date('j');
32
-$cat   = isset($_GET['cat']) ? (int)$_GET['cat'] : 0;
29
+$year  = isset($_GET['year']) ? (int) $_GET['year'] : date('Y');
30
+$month = isset($_GET['month']) ? (int) $_GET['month'] : date('n');
31
+$day   = isset($_GET['day']) ? (int) $_GET['day'] : date('j');
32
+$cat   = isset($_GET['cat']) ? (int) $_GET['cat'] : 0;
33 33
 /* ========================================================================== */
34 34
 
35 35
 // Validate the date (day, month and year)
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
     'cat'          => $cat,
65 65
     'externalKeys' => 'cat_id',
66 66
 ];
67
-$events   = $eventHandler->getEventsOnPeriode($criteres);
67
+$events = $eventHandler->getEventsOnPeriode($criteres);
68 68
 /**********************************************************************/
69 69
 $eventsArray = $events;
70 70
 // Formating date
@@ -105,21 +105,21 @@  discard block
 block discarded – undo
105 105
 $nWeekCalObj = $weekCalObj->nextWeek('object');
106 106
 $navig       = [
107 107
     'prev' => [
108
-        'uri'  => 'year=' . $pWeekCalObj->thisYear() . '&month=' . $pWeekCalObj->thisMonth() . '&day=' . $pWeekCalObj->thisDay(),
108
+        'uri'  => 'year='.$pWeekCalObj->thisYear().'&month='.$pWeekCalObj->thisMonth().'&day='.$pWeekCalObj->thisDay(),
109 109
         'name' => $timeHandler->getFormatedDate($extcalConfig['nav_date_week'], $pWeekCalObj->getTimestamp()),
110 110
     ],
111 111
     'this' => [
112
-        'uri'  => 'year=' . $weekCalObj->thisYear() . '&month=' . $weekCalObj->thisMonth() . '&day=' . $weekCalObj->thisDay(),
112
+        'uri'  => 'year='.$weekCalObj->thisYear().'&month='.$weekCalObj->thisMonth().'&day='.$weekCalObj->thisDay(),
113 113
         'name' => $timeHandler->getFormatedDate($extcalConfig['nav_date_week'], $weekCalObj->getTimestamp()),
114 114
     ],
115 115
     'next' => [
116
-        'uri'  => 'year=' . $nWeekCalObj->thisYear() . '&month=' . $nWeekCalObj->thisMonth() . '&day=' . $nWeekCalObj->thisDay(),
116
+        'uri'  => 'year='.$nWeekCalObj->thisYear().'&month='.$nWeekCalObj->thisMonth().'&day='.$nWeekCalObj->thisDay(),
117 117
         'name' => $timeHandler->getFormatedDate($extcalConfig['nav_date_week'], $nWeekCalObj->getTimestamp()),
118 118
     ],
119 119
 ];
120 120
 
121 121
 // Title of the page
122
-$xoopsTpl->assign('xoops_pagetitle', $xoopsModule->getVar('name') . ' ' . $navig['this']['name']);
122
+$xoopsTpl->assign('xoops_pagetitle', $xoopsModule->getVar('name').' '.$navig['this']['name']);
123 123
 
124 124
 // Assigning navig data to the template
125 125
 $xoopsTpl->assign('navig', $navig);
@@ -179,4 +179,4 @@  discard block
 block discarded – undo
179 179
 $xoopsTpl->assign('lang', $lang);
180 180
 $xoopsTpl->assign('view', 'week');
181 181
 
182
-include XOOPS_ROOT_PATH . '/footer.php';
182
+include XOOPS_ROOT_PATH.'/footer.php';
Please login to merge, or discard this patch.
class/Common/VersionChecks.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -40,13 +40,13 @@  discard block
 block discarded – undo
40 40
         //check for minimum XOOPS version
41 41
         $currentVer = substr(XOOPS_VERSION, 6); // get the numeric part of string
42 42
         if (null === $requiredVer) {
43
-            $requiredVer = '' . $module->getInfo('min_xoops'); //making sure it's a string
43
+            $requiredVer = ''.$module->getInfo('min_xoops'); //making sure it's a string
44 44
         }
45 45
         $success = true;
46 46
 
47 47
         if (version_compare($currentVer, $requiredVer, '<')) {
48 48
             $success = false;
49
-            $module->setErrors(sprintf(constant('CO_' . $moduleDirNameUpper . '_ERROR_BAD_XOOPS'), $requiredVer, $currentVer));
49
+            $module->setErrors(sprintf(constant('CO_'.$moduleDirNameUpper.'_ERROR_BAD_XOOPS'), $requiredVer, $currentVer));
50 50
         }
51 51
 
52 52
         return $success;
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
         $reqVer  = $module->getInfo('min_php');
71 71
         if (false !== $reqVer && '' !== $reqVer) {
72 72
             if (version_compare($verNum, $reqVer, '<')) {
73
-                $module->setErrors(sprintf(constant('CO_' . $moduleDirNameUpper . '_ERROR_BAD_PHP'), $reqVer, $verNum));
73
+                $module->setErrors(sprintf(constant('CO_'.$moduleDirNameUpper.'_ERROR_BAD_PHP'), $reqVer, $verNum));
74 74
                 $success = false;
75 75
             }
76 76
         }
Please login to merge, or discard this patch.