@@ -143,7 +143,7 @@ |
||
| 143 | 143 | /** |
| 144 | 144 | * Helper function for comparing characters with significant whitespaces |
| 145 | 145 | * @param type $expected |
| 146 | - * @param type $actual |
|
| 146 | + * @param string $actual |
|
| 147 | 147 | */ |
| 148 | 148 | protected function assertEqualsQuoted($expected, $actual) { |
| 149 | 149 | $message = sprintf( |
@@ -119,6 +119,10 @@ discard block |
||
| 119 | 119 | )); |
| 120 | 120 | } |
| 121 | 121 | |
| 122 | + /** |
|
| 123 | + * @param HTMLText $result |
|
| 124 | + * @param string[] $expected |
|
| 125 | + */ |
|
| 122 | 126 | private function assertExpectedStrings($result, $expected) { |
| 123 | 127 | foreach ($expected as $expectedStr) { |
| 124 | 128 | $this->assertTrue( |
@@ -738,6 +742,10 @@ discard block |
||
| 738 | 742 | $this->assertEquals('A A1 A1 i A1 ii A2 A3', $rationalisedResult); |
| 739 | 743 | } |
| 740 | 744 | |
| 745 | + /** |
|
| 746 | + * @param string $a |
|
| 747 | + * @param string $b |
|
| 748 | + */ |
|
| 741 | 749 | public function assertEqualIgnoringWhitespace($a, $b) { |
| 742 | 750 | $this->assertEquals(preg_replace('/\s+/', '', $a), preg_replace('/\s+/', '', $b)); |
| 743 | 751 | } |
@@ -1077,6 +1085,10 @@ discard block |
||
| 1077 | 1085 | ); |
| 1078 | 1086 | } |
| 1079 | 1087 | |
| 1088 | + /** |
|
| 1089 | + * @param string $theme |
|
| 1090 | + * @param Closure $callback |
|
| 1091 | + */ |
|
| 1080 | 1092 | protected function useTestTheme($theme, $callback) { |
| 1081 | 1093 | global $project; |
| 1082 | 1094 | |
@@ -1363,6 +1375,11 @@ discard block |
||
| 1363 | 1375 | Config::inst()->update('SSViewer', 'source_file_comments', false); |
| 1364 | 1376 | Config::inst()->update('Director', 'environment_type', $origEnv); |
| 1365 | 1377 | } |
| 1378 | + |
|
| 1379 | + /** |
|
| 1380 | + * @param string $name |
|
| 1381 | + * @param string $expected |
|
| 1382 | + */ |
|
| 1366 | 1383 | private function _renderWithSourceFileComments($name, $expected) { |
| 1367 | 1384 | $viewer = new SSViewer(array($name)); |
| 1368 | 1385 | $data = new ArrayData(array()); |
@@ -345,7 +345,7 @@ discard block |
||
| 345 | 345 | /** |
| 346 | 346 | * Use this method to get the last error ocurred |
| 347 | 347 | * @param void |
| 348 | - * @return string The last error, that occured |
|
| 348 | + * @return boolean The last error, that occured |
|
| 349 | 349 | * @access public |
| 350 | 350 | */ |
| 351 | 351 | function get_last_error() |
@@ -513,6 +513,8 @@ discard block |
||
| 513 | 513 | /** |
| 514 | 514 | * Adapt the bias according to the current code point and position |
| 515 | 515 | * @access private |
| 516 | + * @param integer $npoints |
|
| 517 | + * @param boolean $is_first |
|
| 516 | 518 | */ |
| 517 | 519 | function _adapt($delta, $npoints, $is_first) |
| 518 | 520 | { |
@@ -639,7 +641,7 @@ discard block |
||
| 639 | 641 | * Decomposes a Hangul syllable |
| 640 | 642 | * (see http://www.unicode.org/unicode/reports/tr15/#Hangul |
| 641 | 643 | * @param integer 32bit UCS4 code point |
| 642 | - * @return array Either Hangul Syllable decomposed or original 32bit value as one value array |
|
| 644 | + * @return integer[] Either Hangul Syllable decomposed or original 32bit value as one value array |
|
| 643 | 645 | * @access private |
| 644 | 646 | */ |
| 645 | 647 | function _hangul_decompose($char) |
@@ -324,7 +324,6 @@ discard block |
||
| 324 | 324 | /** |
| 325 | 325 | * Returns the modulus of the numerical position of the item in the data set. |
| 326 | 326 | * The count starts from $startIndex, which defaults to 1. |
| 327 | - * @param int $Mod The number to perform Mod operation to. |
|
| 328 | 327 | * @param int $startIndex Number to start count from. |
| 329 | 328 | * @return int |
| 330 | 329 | */ |
@@ -398,6 +397,10 @@ discard block |
||
| 398 | 397 | $this->underlay = $underlay ? $underlay : array(); |
| 399 | 398 | } |
| 400 | 399 | |
| 400 | + /** |
|
| 401 | + * @param string $interfaceToQuery |
|
| 402 | + * @param string $variableMethod |
|
| 403 | + */ |
|
| 401 | 404 | protected function createCallableArray(&$extraArray, $interfaceToQuery, $variableMethod, $createObject = false) { |
| 402 | 405 | $implementers = ClassInfo::implementorsOf($interfaceToQuery); |
| 403 | 406 | if($implementers) foreach($implementers as $implementer) { |
@@ -732,7 +735,7 @@ discard block |
||
| 732 | 735 | * |
| 733 | 736 | * @param $className string - valid class name |
| 734 | 737 | * @param $suffix string |
| 735 | - * @param $baseClass string |
|
| 738 | + * @param string $baseClass string |
|
| 736 | 739 | * |
| 737 | 740 | * @return array |
| 738 | 741 | */ |
@@ -1130,7 +1133,7 @@ discard block |
||
| 1130 | 1133 | * @param string $template Template name |
| 1131 | 1134 | * @param mixed $data Data context |
| 1132 | 1135 | * @param array $arguments Additional arguments |
| 1133 | - * @return string Evaluated result |
|
| 1136 | + * @return HTMLText Evaluated result |
|
| 1134 | 1137 | */ |
| 1135 | 1138 | public static function execute_template($template, $data, $arguments = null, $scope = null) { |
| 1136 | 1139 | $v = new SSViewer($template); |
@@ -1184,7 +1187,7 @@ discard block |
||
| 1184 | 1187 | * Return an appropriate base tag for the given template. |
| 1185 | 1188 | * It will be closed on an XHTML document, and unclosed on an HTML document. |
| 1186 | 1189 | * |
| 1187 | - * @param $contentGeneratedSoFar The content of the template generated so far; it should contain |
|
| 1190 | + * @param string $contentGeneratedSoFar The content of the template generated so far; it should contain |
|
| 1188 | 1191 | * the DOCTYPE declaration. |
| 1189 | 1192 | */ |
| 1190 | 1193 | public static function get_base_tag($contentGeneratedSoFar) { |
@@ -732,6 +732,9 @@ discard block |
||
| 732 | 732 | return $result; |
| 733 | 733 | } |
| 734 | 734 | |
| 735 | + /** |
|
| 736 | + * @param string $mode |
|
| 737 | + */ |
|
| 735 | 738 | protected function _get($dir, $mode, $tags = array()) |
| 736 | 739 | { |
| 737 | 740 | if (!is_dir($dir)) { |
@@ -819,6 +822,7 @@ discard block |
||
| 819 | 822 | /** |
| 820 | 823 | * Compute & return the expire time |
| 821 | 824 | * |
| 825 | + * @param integer $lifetime |
|
| 822 | 826 | * @return int expire time (unix timestamp) |
| 823 | 827 | */ |
| 824 | 828 | protected function _expireTime($lifetime) |