@@ -9,7 +9,7 @@ |
||
9 | 9 | use SMWDIError as DIError; |
10 | 10 | use SMWDINumber as DINumber; |
11 | 11 | use SMWDIUri as DIUri; |
12 | -use SMWDITime as DITime; |
|
12 | +use SMWDITime as DITime; |
|
13 | 13 | |
14 | 14 | /** |
15 | 15 | * @private |
@@ -60,7 +60,7 @@ |
||
60 | 60 | * @since 2.5 |
61 | 61 | * |
62 | 62 | * @param DescriptionFactory|null $descriptionFactory |
63 | - * @param DataItemFactory|null $dataItemFactory |
|
63 | + * @param null|DescriptionFactory $dataItemFactory |
|
64 | 64 | */ |
65 | 65 | public function __construct( DescriptionFactory $descriptionFactory = null, DescriptionFactory $dataItemFactory = null ) { |
66 | 66 | $this->descriptionFactory = $descriptionFactory; |
@@ -77,6 +77,10 @@ |
||
77 | 77 | return $description; |
78 | 78 | } |
79 | 79 | |
80 | + /** |
|
81 | + * @param DIWikiPage $dataItem |
|
82 | + * @param ValueDescription $description |
|
83 | + */ |
|
80 | 84 | private function findApproriateDescription( $comparator, $dataItem, $description ) { |
81 | 85 | |
82 | 86 | $value = $dataItem->getDBKey(); |
@@ -3,7 +3,6 @@ |
||
3 | 3 | namespace SMW\Deserializers\DVDescriptionDeserializer; |
4 | 4 | |
5 | 5 | use InvalidArgumentException; |
6 | -use SMW\Query\Language\ThingDescription; |
|
7 | 6 | use SMW\Query\Language\ValueDescription; |
8 | 7 | use SMWDataValue as DataValue; |
9 | 8 | use SMW\DIWikiPage; |
@@ -327,7 +327,7 @@ discard block |
||
327 | 327 | * |
328 | 328 | * @param string $timestamp must be in format |
329 | 329 | * |
330 | - * @return SMWDITime|false |
|
330 | + * @return SMWDataItem |
|
331 | 331 | */ |
332 | 332 | public static function newFromTimestamp( $timestamp ) { |
333 | 333 | $timestamp = wfTimestamp( TS_MW, (string)$timestamp ); |
@@ -494,10 +494,10 @@ discard block |
||
494 | 494 | * calendar model, presicion. |
495 | 495 | * |
496 | 496 | * @param double $jdValue |
497 | - * @param integer|null $calendarmodel |
|
497 | + * @param integer|null $calendarModel |
|
498 | 498 | * @param integer|null $precision |
499 | 499 | * |
500 | - * @return DITime object |
|
500 | + * @return SMWDITime object |
|
501 | 501 | */ |
502 | 502 | public static function newFromJD( $jdValue, $calendarModel = null, $precision = null ) { |
503 | 503 | |
@@ -579,6 +579,11 @@ discard block |
||
579 | 579 | return $this->m_day > self::getDayNumberForMonth( $this->m_month, $this->m_year, $this->m_model ); |
580 | 580 | } |
581 | 581 | |
582 | + /** |
|
583 | + * @param boolean $month |
|
584 | + * @param boolean $day |
|
585 | + * @param boolean $hour |
|
586 | + */ |
|
582 | 587 | private function setPrecisionLevelBy( $month, $day, $hour ) { |
583 | 588 | if ( $month === false ) { |
584 | 589 | $this->m_precision = self::PREC_Y; |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | /** |
35 | 35 | * @since 2.4 |
36 | 36 | * |
37 | - * @param integer $calendarmodel |
|
37 | + * @param integer $calendarModel |
|
38 | 38 | * @param integer $year |
39 | 39 | * @param integer $month |
40 | 40 | * @param integer $day |
@@ -68,10 +68,10 @@ discard block |
||
68 | 68 | * calendar model. This calculation assumes that neither calendar |
69 | 69 | * has a year 0. |
70 | 70 | * |
71 | - * @param $year integer representing the year |
|
72 | - * @param $month integer representing the month |
|
73 | - * @param $day integer representing the day |
|
74 | - * @param $calendarmodel integer either CM_GREGORIAN or CM_JULIAN |
|
71 | + * @param integer $year integer representing the year |
|
72 | + * @param integer $month integer representing the month |
|
73 | + * @param integer $day integer representing the day |
|
74 | + * @param integer $calendarmodel integer either CM_GREGORIAN or CM_JULIAN |
|
75 | 75 | * |
76 | 76 | * @return float Julian Day number |
77 | 77 | * @throws RuntimeException |
@@ -97,9 +97,9 @@ discard block |
||
97 | 97 | * Compute the offset for the Julian Day number from a given time. |
98 | 98 | * This computation is the same for all calendar models. |
99 | 99 | * |
100 | - * @param $hours integer representing the hour |
|
101 | - * @param $minutes integer representing the minutes |
|
102 | - * @param $seconds integer representing the seconds |
|
100 | + * @param integer $hours integer representing the hour |
|
101 | + * @param integer $minutes integer representing the minutes |
|
102 | + * @param integer $seconds integer representing the seconds |
|
103 | 103 | * |
104 | 104 | * @return float offset for a Julian Day number to get this time |
105 | 105 | */ |
@@ -114,8 +114,8 @@ discard block |
||
114 | 114 | * conversion to Gregorian needs positive JD. If this happens, wrong |
115 | 115 | * values will be returned. Avoid date conversions before 10000 BCE. |
116 | 116 | * |
117 | - * @param $jdValue float number of Julian Days |
|
118 | - * @param $calendarModel integer either CM_GREGORIAN or CM_JULIAN |
|
117 | + * @param double $jdValue float number of Julian Days |
|
118 | + * @param integer $calendarModel integer either CM_GREGORIAN or CM_JULIAN |
|
119 | 119 | * |
120 | 120 | * @return array( calendarModel, yearnumber, monthnumber, daynumber ) |
121 | 121 | * @throws RuntimeException |
@@ -166,7 +166,7 @@ discard block |
||
166 | 166 | * Extract the time from a Julian Day number and return it as a string. |
167 | 167 | * This conversion is the same for all calendar models. |
168 | 168 | * |
169 | - * @param $jdvalue float number of Julian Days |
|
169 | + * @param double $jdvalue float number of Julian Days |
|
170 | 170 | * @return array( hours, minutes, seconds ) |
171 | 171 | */ |
172 | 172 | public static function JD2Time( $jdvalue ) { |
@@ -169,7 +169,7 @@ discard block |
||
169 | 169 | * |
170 | 170 | * @param string $identifer |
171 | 171 | * |
172 | - * @return false|integer |
|
172 | + * @return string |
|
173 | 173 | */ |
174 | 174 | public static function getIdByAbbreviation( $identifer ) { |
175 | 175 | |
@@ -193,7 +193,7 @@ discard block |
||
193 | 193 | * |
194 | 194 | * @param integer $identifer |
195 | 195 | * |
196 | - * @return false|string |
|
196 | + * @return string |
|
197 | 197 | */ |
198 | 198 | public static function getAbbreviationById( $identifer ) { |
199 | 199 | |
@@ -312,7 +312,7 @@ discard block |
||
312 | 312 | * |
313 | 313 | * @param string $abbreviation |
314 | 314 | * |
315 | - * @return false|DateTimeZone |
|
315 | + * @return DateTimeZone |
|
316 | 316 | */ |
317 | 317 | public static function newDateTimeZone( $abbreviation ) { |
318 | 318 | |
@@ -353,7 +353,7 @@ discard block |
||
353 | 353 | * @since 2.5 |
354 | 354 | * |
355 | 355 | * @param DateTime &$dateTime |
356 | - * @param string|integer $identifer |
|
356 | + * @param integer $identifer |
|
357 | 357 | * |
358 | 358 | * @return string |
359 | 359 | */ |
@@ -2,7 +2,6 @@ |
||
2 | 2 | |
3 | 3 | namespace SMW\Tests\Libs\Time; |
4 | 4 | |
5 | -use SMW\DataItemFactory; |
|
6 | 5 | use SMW\Libs\Time\Timezone; |
7 | 6 | |
8 | 7 | /** |
@@ -155,7 +155,7 @@ discard block |
||
155 | 155 | * |
156 | 156 | * @param string $text |
157 | 157 | * |
158 | - * @return text |
|
158 | + * @return string |
|
159 | 159 | */ |
160 | 160 | public static function decodeSquareBracket( $text ) { |
161 | 161 | return str_replace( array( '%5B', '%5D' ), array( '[', ']' ), $text ); |
@@ -166,7 +166,7 @@ discard block |
||
166 | 166 | * |
167 | 167 | * @param string $text |
168 | 168 | * |
169 | - * @return text |
|
169 | + * @return string |
|
170 | 170 | */ |
171 | 171 | public static function obscureAnnotation( $text ) { |
172 | 172 | return preg_replace_callback( |
@@ -183,7 +183,7 @@ discard block |
||
183 | 183 | * |
184 | 184 | * @param string $text |
185 | 185 | * |
186 | - * @return text |
|
186 | + * @return string |
|
187 | 187 | */ |
188 | 188 | public static function removeAnnotation( $text ) { |
189 | 189 | return preg_replace_callback( |
@@ -257,7 +257,7 @@ discard block |
||
257 | 257 | * |
258 | 258 | * @since 1.9 |
259 | 259 | * |
260 | - * @return array |
|
260 | + * @return string[] |
|
261 | 261 | */ |
262 | 262 | protected function getModules() { |
263 | 263 | return array( |
@@ -482,6 +482,9 @@ discard block |
||
482 | 482 | $this->isEnabledNamespace = $this->applicationFactory->getNamespaceExaminer()->isSemanticEnabled( $title->getNamespace() ); |
483 | 483 | } |
484 | 484 | |
485 | + /** |
|
486 | + * @param DIWikiPage $subject |
|
487 | + */ |
|
485 | 488 | private function getPropertyLink( $subject, $properties, $value, $valueCaption ) { |
486 | 489 | |
487 | 490 | // #... |
@@ -15,7 +15,7 @@ discard block |
||
15 | 15 | * |
16 | 16 | * @param string $text |
17 | 17 | * |
18 | - * @return text |
|
18 | + * @return string |
|
19 | 19 | */ |
20 | 20 | public static function decodeSquareBracket( $text ) { |
21 | 21 | return str_replace( array( '%5B', '%5D' ), array( '[', ']' ), $text ); |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | * |
27 | 27 | * @param string $text |
28 | 28 | * |
29 | - * @return text |
|
29 | + * @return string |
|
30 | 30 | */ |
31 | 31 | public static function obscureAnnotation( $text ) { |
32 | 32 | return preg_replace_callback( |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | * |
44 | 44 | * @param string $text |
45 | 45 | * |
46 | - * @return text |
|
46 | + * @return string |
|
47 | 47 | */ |
48 | 48 | public static function removeAnnotation( $text ) { |
49 | 49 | return preg_replace_callback( |