1 | <?php |
||
2 | /** |
||
3 | * Description: demonstrates using the Weekday decorator |
||
4 | */ |
||
5 | if (!@include 'Calendar'.DIRECTORY_SEPARATOR.'Calendar.php') { |
||
6 | define('CALENDAR_ROOT', '../../'); |
||
7 | } |
||
8 | require_once CALENDAR_ROOT.'Day.php'; |
||
9 | require_once CALENDAR_ROOT.'Decorator/Weekday.php'; |
||
10 | |||
11 | $Day = new Calendar_Day(date('Y'), date('n'),date('d')); |
||
0 ignored issues
–
show
|
|||
12 | $WeekDay = & new Calendar_Decorator_Weekday($Day); |
||
0 ignored issues
–
show
The type
Calendar_Decorator_Weekday was not found. Maybe you did not declare it correctly or list all dependencies?
The issue could also be caused by a filter entry in the build configuration.
If the path has been excluded in your configuration, e.g. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths ![]() |
|||
13 | // $WeekDay->setFirstDay(0); // Make Sunday first Day |
||
14 | |||
15 | echo 'Yesterday: '.$WeekDay->prevWeekDay().'<br>'; |
||
16 | echo 'Today: '.$WeekDay->thisWeekDay().'<br>'; |
||
17 | echo 'Tomorrow: '.$WeekDay->nextWeekDay().'<br>'; |
||
18 | |||
19 | $WeekDay->build(); |
||
20 | echo 'Hours today:<br>'; |
||
21 | while ( $Hour = $WeekDay->fetch() ) { |
||
22 | echo $Hour->thisHour().'<br>'; |
||
23 | } |
||
24 | ?> |
||
0 ignored issues
–
show
It is not recommended to use PHP's closing tag
?> in files other than templates.
Using a closing tag in PHP files that only contain PHP code is not recommended as you might accidentally add whitespace after the closing tag which would then be output by PHP. This can cause severe problems, for example headers cannot be sent anymore. A simple precaution is to leave off the closing tag as it is not required, and it also has no negative effects whatsoever. ![]() |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"]
, you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths