@@ -409,7 +409,7 @@ |
||
| 409 | 409 | * |
| 410 | 410 | * @param DataObjectInterface $record |
| 411 | 411 | * |
| 412 | - * @return boolean |
|
| 412 | + * @return false|null |
|
| 413 | 413 | */ |
| 414 | 414 | public function saveInto(DataObjectInterface $record) { |
| 415 | 415 | if(!$this->isSaveable()) { |
@@ -32,6 +32,10 @@ discard block |
||
| 32 | 32 | */ |
| 33 | 33 | protected $fieldCurrency = null; |
| 34 | 34 | |
| 35 | + /** |
|
| 36 | + * @param string $name |
|
| 37 | + * @param string $title |
|
| 38 | + */ |
|
| 35 | 39 | public function __construct($name, $title = null, $value = "") { |
| 36 | 40 | // naming with underscores to prevent values from actually being saved somewhere |
| 37 | 41 | $this->fieldAmount = new NumericField("{$name}[Amount]", _t('MoneyField.FIELDLABELAMOUNT', 'Amount')); |
@@ -135,6 +139,7 @@ discard block |
||
| 135 | 139 | /** |
| 136 | 140 | * @todo Implement removal of readonly state with $bool=false |
| 137 | 141 | * @todo Set readonly state whenever field is recreated, e.g. in setAllowedCurrencies() |
| 142 | + * @param boolean $bool |
|
| 138 | 143 | */ |
| 139 | 144 | public function setReadonly($bool) { |
| 140 | 145 | parent::setReadonly($bool); |
@@ -223,6 +223,7 @@ |
||
| 223 | 223 | * via the standard template inclusion process. |
| 224 | 224 | * |
| 225 | 225 | * @param string |
| 226 | + * @param string $template |
|
| 226 | 227 | */ |
| 227 | 228 | public function setTemplate($template) { |
| 228 | 229 | $this->template = $template; |
@@ -133,6 +133,7 @@ discard block |
||
| 133 | 133 | * {@inheritdoc} |
| 134 | 134 | * |
| 135 | 135 | * Also set the URLParams |
| 136 | + * @param SS_HTTPRequest $request |
|
| 136 | 137 | */ |
| 137 | 138 | public function setRequest($request) { |
| 138 | 139 | $return = parent::setRequest($request); |
@@ -509,7 +510,7 @@ discard block |
||
| 509 | 510 | * |
| 510 | 511 | * @param array $params |
| 511 | 512 | * |
| 512 | - * @return string |
|
| 513 | + * @return DBHTMLText |
|
| 513 | 514 | */ |
| 514 | 515 | public function render($params = null) { |
| 515 | 516 | $template = $this->getViewer($this->getAction()); |
@@ -674,7 +675,7 @@ discard block |
||
| 674 | 675 | * Tests whether a redirection has been requested. If redirect() has been called, it will return |
| 675 | 676 | * the URL redirected to. Otherwise, it will return null. |
| 676 | 677 | * |
| 677 | - * @return null|string |
|
| 678 | + * @return boolean |
|
| 678 | 679 | */ |
| 679 | 680 | public function redirectedTo() { |
| 680 | 681 | return $this->getResponse() && $this->getResponse()->getHeader('Location'); |
@@ -144,7 +144,7 @@ |
||
| 144 | 144 | /** |
| 145 | 145 | * Get meta-data details on a named method |
| 146 | 146 | * |
| 147 | - * @param array $method |
|
| 147 | + * @param string $method |
|
| 148 | 148 | * @return array List of custom method details, if defined for this method |
| 149 | 149 | */ |
| 150 | 150 | protected function getExtraMethodConfig($method) { |
@@ -38,6 +38,9 @@ discard block |
||
| 38 | 38 | ] |
| 39 | 39 | ); |
| 40 | 40 | |
| 41 | + /** |
|
| 42 | + * @param string $root |
|
| 43 | + */ |
|
| 41 | 44 | public function __construct($root = null, $writeFlags = LOCK_EX, $linkHandling = self::DISALLOW_LINKS) { |
| 42 | 45 | // Get root path |
| 43 | 46 | $root = $this->findRoot($root); |
@@ -118,7 +121,7 @@ discard block |
||
| 118 | 121 | * Render server configuration file from a template file |
| 119 | 122 | * |
| 120 | 123 | * @param string $template |
| 121 | - * @return DBHTMLText Rendered results |
|
| 124 | + * @return string Rendered results |
|
| 122 | 125 | */ |
| 123 | 126 | protected function renderTemplate($template) { |
| 124 | 127 | // Build allowed extensions |
@@ -123,6 +123,10 @@ discard block |
||
| 123 | 123 | )); |
| 124 | 124 | } |
| 125 | 125 | |
| 126 | + /** |
|
| 127 | + * @param DBHTMLText $result |
|
| 128 | + * @param string[] $expected |
|
| 129 | + */ |
|
| 126 | 130 | private function assertExpectedStrings($result, $expected) { |
| 127 | 131 | foreach ($expected as $expectedStr) { |
| 128 | 132 | $this->assertTrue( |
@@ -756,6 +760,10 @@ discard block |
||
| 756 | 760 | $this->assertEquals('A A1 A1 i A1 ii A2 A3', $rationalisedResult); |
| 757 | 761 | } |
| 758 | 762 | |
| 763 | + /** |
|
| 764 | + * @param string $a |
|
| 765 | + * @param string $b |
|
| 766 | + */ |
|
| 759 | 767 | public function assertEqualIgnoringWhitespace($a, $b) { |
| 760 | 768 | $this->assertEquals(preg_replace('/\s+/', '', $a), preg_replace('/\s+/', '', $b)); |
| 761 | 769 | } |
@@ -1375,6 +1383,11 @@ discard block |
||
| 1375 | 1383 | Config::inst()->update('SSViewer', 'source_file_comments', false); |
| 1376 | 1384 | Config::inst()->update('Director', 'environment_type', $origEnv); |
| 1377 | 1385 | } |
| 1386 | + |
|
| 1387 | + /** |
|
| 1388 | + * @param string $name |
|
| 1389 | + * @param string $expected |
|
| 1390 | + */ |
|
| 1378 | 1391 | private function _renderWithSourceFileComments($name, $expected) { |
| 1379 | 1392 | $viewer = new SSViewer(array($name)); |
| 1380 | 1393 | $data = new ArrayData(array()); |
@@ -368,7 +368,6 @@ discard block |
||
| 368 | 368 | /** |
| 369 | 369 | * Returns the modulus of the numerical position of the item in the data set. |
| 370 | 370 | * The count starts from $startIndex, which defaults to 1. |
| 371 | - * @param int $Mod The number to perform Mod operation to. |
|
| 372 | 371 | * @param int $startIndex Number to start count from. |
| 373 | 372 | * @return int |
| 374 | 373 | */ |
@@ -442,6 +441,10 @@ discard block |
||
| 442 | 441 | $this->underlay = $underlay ? $underlay : array(); |
| 443 | 442 | } |
| 444 | 443 | |
| 444 | + /** |
|
| 445 | + * @param string $interfaceToQuery |
|
| 446 | + * @param string $variableMethod |
|
| 447 | + */ |
|
| 445 | 448 | protected function createCallableArray(&$extraArray, $interfaceToQuery, $variableMethod, $createObject = false) { |
| 446 | 449 | $implementers = ClassInfo::implementorsOf($interfaceToQuery); |
| 447 | 450 | if($implementers) foreach($implementers as $implementer) { |
@@ -849,7 +852,7 @@ discard block |
||
| 849 | 852 | * |
| 850 | 853 | * @param $className string - valid class name |
| 851 | 854 | * @param $suffix string |
| 852 | - * @param $baseClass string |
|
| 855 | + * @param string $baseClass string |
|
| 853 | 856 | * |
| 854 | 857 | * @return array |
| 855 | 858 | */ |
@@ -1254,7 +1257,7 @@ discard block |
||
| 1254 | 1257 | * @param string $template Template name |
| 1255 | 1258 | * @param mixed $data Data context |
| 1256 | 1259 | * @param array $arguments Additional arguments |
| 1257 | - * @return string Evaluated result |
|
| 1260 | + * @return DBHTMLText Evaluated result |
|
| 1258 | 1261 | */ |
| 1259 | 1262 | public static function execute_template($template, $data, $arguments = null, $scope = null) { |
| 1260 | 1263 | $v = new SSViewer($template); |
@@ -1280,6 +1283,9 @@ discard block |
||
| 1280 | 1283 | return $v->process($data, $arguments); |
| 1281 | 1284 | } |
| 1282 | 1285 | |
| 1286 | + /** |
|
| 1287 | + * @param string $content |
|
| 1288 | + */ |
|
| 1283 | 1289 | public function parseTemplateContent($content, $template="") { |
| 1284 | 1290 | return $this->getParser()->compileString( |
| 1285 | 1291 | $content, |
@@ -1308,7 +1314,7 @@ discard block |
||
| 1308 | 1314 | * Return an appropriate base tag for the given template. |
| 1309 | 1315 | * It will be closed on an XHTML document, and unclosed on an HTML document. |
| 1310 | 1316 | * |
| 1311 | - * @param $contentGeneratedSoFar The content of the template generated so far; it should contain |
|
| 1317 | + * @param string $contentGeneratedSoFar The content of the template generated so far; it should contain |
|
| 1312 | 1318 | * the DOCTYPE declaration. |
| 1313 | 1319 | */ |
| 1314 | 1320 | public static function get_base_tag($contentGeneratedSoFar) { |
@@ -1349,6 +1355,9 @@ discard block |
||
| 1349 | 1355 | */ |
| 1350 | 1356 | protected $cacheTemplate; |
| 1351 | 1357 | |
| 1358 | + /** |
|
| 1359 | + * @param string $content |
|
| 1360 | + */ |
|
| 1352 | 1361 | public function __construct($content, TemplateParser $parser = null) { |
| 1353 | 1362 | if ($parser) { |
| 1354 | 1363 | $this->setParser($parser); |
@@ -125,7 +125,7 @@ |
||
| 125 | 125 | /** |
| 126 | 126 | * Get the current failover object if set |
| 127 | 127 | * |
| 128 | - * @return ViewableData|null |
|
| 128 | + * @return ViewableData |
|
| 129 | 129 | */ |
| 130 | 130 | public function getFailover() { |
| 131 | 131 | return $this->failover; |