mambax7/extcal

View on GitHub
view_calendar-week.php

Summary

Maintainability
C
1 day
Test Coverage

Showing 3 of 3 total issues

Similar blocks of code found in 5 locations. Consider refactoring.
Open

$navig = [
'prev' => [
'uri' => 'year=' . $pWeekCalObj->thisYear() . '&month=' . $pWeekCalObj->thisMonth() . '&day=' . $pWeekCalObj->thisDay(),
'name' => $timeHandler->getFormatedDate($helper->getConfig('nav_date_week'), $pWeekCalObj->getTimestamp()),
],
Severity: Major
Found in view_calendar-week.php and 4 other locations - About 5 hrs to fix
view_agenda-day.php on lines 115..128
view_agenda-week.php on lines 119..132
view_day.php on lines 112..125
view_week.php on lines 118..131

Identical blocks of code found in 2 locations. Consider refactoring.
Open

$selectedDays = [
new Calendar_Day(date('Y', xoops_getUserTimestamp(time(), $timeHandler->getUserTimeZone($xoopsUser))), date('n', xoops_getUserTimestamp(time(), $timeHandler->getUserTimeZone($xoopsUser))), date('j', xoops_getUserTimestamp(time(), $timeHandler->getUserTimeZone($xoopsUser)))),
];
Severity: Major
Found in view_calendar-week.php and 1 other location - About 1 hr to fix
view_calendar-month.php on lines 81..83

Similar blocks of code found in 12 locations. Consider refactoring.
Open

$lang = [
'start' => _MD_EXTCAL_START,
'end' => _MD_EXTCAL_END,
'calmonth' => _MD_EXTCAL_NAV_CALMONTH,
'calweek' => _MD_EXTCAL_NAV_CALWEEK,
Severity: Major
Found in view_calendar-week.php and 11 other locations - About 1 hr to fix
class/Time.php on lines 50..63
event.php on lines 232..245
view_agenda-day.php on lines 154..167
view_agenda-week.php on lines 158..171
view_calendar-month.php on lines 183..196
view_day.php on lines 168..181
view_month.php on lines 157..170
view_new-event.php on lines 54..67
view_search.php on lines 229..242
view_week.php on lines 175..188
view_year.php on lines 162..175
Category
Status