1 | <?php |
||
23 | class JulianDay { |
||
24 | |||
25 | /** |
||
26 | * Moment of switchover to Gregorian calendar. |
||
27 | */ |
||
28 | const J1582 = 2299160.5; |
||
29 | |||
30 | /** |
||
31 | * Offset of Julian Days for Modified JD inputs. |
||
32 | */ |
||
33 | const MJD = 2400000.5; |
||
34 | |||
35 | /** |
||
36 | * Create a new time dataItem from a specified Julian Day number, |
||
37 | * calendar model, presicion. |
||
38 | * |
||
39 | * @param double $jdValue |
||
40 | * @param integer|null $calendarmodel |
||
|
|||
41 | * @param integer|null $precision |
||
42 | * |
||
43 | * @return DITime object |
||
44 | */ |
||
45 | public static function newDiFromJD( $jdValue, $calendarModel = null, $precision = null ) { |
||
72 | |||
73 | /** |
||
74 | * @since 2.4 |
||
75 | * |
||
76 | * @param DITime $dataItem |
||
77 | * |
||
78 | * @return float |
||
79 | */ |
||
80 | public static function get( DITime $dataItem ) { |
||
96 | |||
97 | /** |
||
98 | * The MJD has a starting point of midnight on November 17, 1858 and is |
||
99 | * computed by MJD = JD - 2400000.5 |
||
100 | * |
||
101 | * @since 2.4 |
||
102 | * |
||
103 | * @param DITime $dataItem |
||
104 | * |
||
105 | * @return float |
||
106 | */ |
||
107 | public static function getModifiedJulianDate( DITime $dataItem ) { |
||
110 | |||
111 | /** |
||
112 | * Compute the Julian Day number from a given date in the specified |
||
113 | * calendar model. This calculation assumes that neither calendar |
||
114 | * has a year 0. |
||
115 | * |
||
116 | * @param $year integer representing the year |
||
117 | * @param $month integer representing the month |
||
118 | * @param $day integer representing the day |
||
119 | * @param $calendarmodel integer either SMWDITime::CM_GREGORIAN or SMWDITime::CM_JULIAN |
||
120 | * |
||
121 | * @return float Julian Day number |
||
122 | * @throws RuntimeException |
||
123 | */ |
||
124 | protected static function date2JD( $year, $month, $day, $calendarmodel ) { |
||
140 | |||
141 | /** |
||
142 | * Compute the offset for the Julian Day number from a given time. |
||
143 | * This computation is the same for all calendar models. |
||
144 | * |
||
145 | * @param $hours integer representing the hour |
||
146 | * @param $minutes integer representing the minutes |
||
147 | * @param $seconds integer representing the seconds |
||
148 | * |
||
149 | * @return float offset for a Julian Day number to get this time |
||
150 | */ |
||
151 | protected static function time2JDoffset( $hours, $minutes, $seconds ) { |
||
154 | |||
155 | /** |
||
156 | * Convert a Julian Day number to a date in the given calendar model. |
||
157 | * This calculation assumes that neither calendar has a year 0. |
||
158 | * @note The algorithm may fail for some cases, in particular since the |
||
159 | * conversion to Gregorian needs positive JD. If this happens, wrong |
||
160 | * values will be returned. Avoid date conversions before 10000 BCE. |
||
161 | * |
||
162 | * @param $jdvalue float number of Julian Days |
||
163 | * @param $calendarmodel integer either SMWDITime::CM_GREGORIAN or SMWDITime::CM_JULIAN |
||
164 | * |
||
165 | * @return array( yearnumber, monthnumber, daynumber ) |
||
166 | * @throws RuntimeException |
||
167 | */ |
||
168 | protected static function JD2Date( $jdvalue, $calendarmodel ) { |
||
205 | |||
206 | /** |
||
207 | * Extract the time from a Julian Day number and return it as a string. |
||
208 | * This conversion is the same for all calendar models. |
||
209 | * |
||
210 | * @param $jdvalue float number of Julian Days |
||
211 | * @return array( hours, minutes, seconds ) |
||
212 | */ |
||
213 | protected static function JD2Time( $jdvalue ) { |
||
223 | |||
224 | } |
||
225 |
This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function. It has, however, found a similar but not annotated parameter which might be a good fit.
Consider the following example. The parameter
$ireland
is not defined by the methodfinale(...)
.The most likely cause is that the parameter was changed, but the annotation was not.