@@ -100,7 +100,7 @@ discard block |
||
| 100 | 100 | /** |
| 101 | 101 | * Get value of display_errors ini value |
| 102 | 102 | * |
| 103 | - * @return mixed |
|
| 103 | + * @return string |
|
| 104 | 104 | */ |
| 105 | 105 | protected function getDisplayErrors() { |
| 106 | 106 | return ini_get('display_errors'); |
@@ -110,7 +110,7 @@ discard block |
||
| 110 | 110 | * Add this callback to the chain of callbacks to call along with the state |
| 111 | 111 | * that $error must be in this point in the chain for the callback to be called |
| 112 | 112 | * |
| 113 | - * @param $callback - The callback to call |
|
| 113 | + * @param callable $callback - The callback to call |
|
| 114 | 114 | * @param $onErrorState - false if only call if no errors yet, true if only call if already errors, null for either |
| 115 | 115 | * @return $this |
| 116 | 116 | */ |
@@ -24,7 +24,7 @@ discard block |
||
| 24 | 24 | /** |
| 25 | 25 | * Modify method visibility to public for testing |
| 26 | 26 | * |
| 27 | - * @param mixed $errors |
|
| 27 | + * @param string $errors |
|
| 28 | 28 | */ |
| 29 | 29 | public function setDisplayErrors($errors) |
| 30 | 30 | { |
@@ -33,6 +33,10 @@ discard block |
||
| 33 | 33 | } |
| 34 | 34 | |
| 35 | 35 | // Change function visibility to be testable directly |
| 36 | + |
|
| 37 | + /** |
|
| 38 | + * @param string $memstring |
|
| 39 | + */ |
|
| 36 | 40 | public function translateMemstring($memstring) { |
| 37 | 41 | return parent::translateMemstring($memstring); |
| 38 | 42 | } |
@@ -219,6 +219,7 @@ discard block |
||
| 219 | 219 | * via the standard template inclusion process. |
| 220 | 220 | * |
| 221 | 221 | * @param string |
| 222 | + * @param string $template |
|
| 222 | 223 | */ |
| 223 | 224 | public function setTemplate($template) { |
| 224 | 225 | $this->template = $template; |
@@ -315,6 +316,7 @@ discard block |
||
| 315 | 316 | /** |
| 316 | 317 | * Return the named field as an obj() call from $this->failover. |
| 317 | 318 | * Default to the given class if there's no casting information. |
| 319 | + * @param string $fieldName |
|
| 318 | 320 | */ |
| 319 | 321 | public function rssField($fieldName, $defaultClass = 'Varchar') { |
| 320 | 322 | if($fieldName) { |
@@ -126,6 +126,7 @@ |
||
| 126 | 126 | * |
| 127 | 127 | * @param string $title |
| 128 | 128 | * @param string $title |
| 129 | + * @param string|false $subtitle |
|
| 129 | 130 | */ |
| 130 | 131 | public function writeInfo($title, $subtitle, $description=false) { |
| 131 | 132 | echo '<div class="info">'; |
@@ -211,7 +211,7 @@ discard block |
||
| 211 | 211 | * |
| 212 | 212 | * @todo Mix in custom column mappings |
| 213 | 213 | * |
| 214 | - * @return array |
|
| 214 | + * @return string |
|
| 215 | 215 | **/ |
| 216 | 216 | public function getImportSpec() { |
| 217 | 217 | $spec = array(); |
@@ -237,7 +237,7 @@ discard block |
||
| 237 | 237 | * so this is mainly a customization method. |
| 238 | 238 | * |
| 239 | 239 | * @param mixed $val |
| 240 | - * @param string $field Name of the field as specified in the array-values for {@link self::$columnMap}. |
|
| 240 | + * @param string $fieldName Name of the field as specified in the array-values for {@link self::$columnMap}. |
|
| 241 | 241 | * @return boolean |
| 242 | 242 | */ |
| 243 | 243 | protected function isNullValue($val, $fieldName = null) { |
@@ -361,7 +361,7 @@ discard block |
||
| 361 | 361 | |
| 362 | 362 | /** |
| 363 | 363 | * @param $obj DataObject |
| 364 | - * @param $message string |
|
| 364 | + * @param string $message string |
|
| 365 | 365 | */ |
| 366 | 366 | public function addCreated($obj, $message = null) { |
| 367 | 367 | $this->created[] = $this->lastChange = array( |
@@ -374,7 +374,7 @@ discard block |
||
| 374 | 374 | |
| 375 | 375 | /** |
| 376 | 376 | * @param $obj DataObject |
| 377 | - * @param $message string |
|
| 377 | + * @param string $message string |
|
| 378 | 378 | */ |
| 379 | 379 | public function addUpdated($obj, $message = null) { |
| 380 | 380 | $this->updated[] = $this->lastChange = array( |
@@ -386,8 +386,8 @@ discard block |
||
| 386 | 386 | } |
| 387 | 387 | |
| 388 | 388 | /** |
| 389 | - * @param $obj DataObject |
|
| 390 | - * @param $message string |
|
| 389 | + * @param DataObject|null $obj DataObject |
|
| 390 | + * @param string $message string |
|
| 391 | 391 | */ |
| 392 | 392 | public function addDeleted($obj, $message = null) { |
| 393 | 393 | $data = $obj->toMap(); |
@@ -126,7 +126,7 @@ discard block |
||
| 126 | 126 | /** |
| 127 | 127 | * Returns the value of this field. |
| 128 | 128 | * |
| 129 | - * @return mixed |
|
| 129 | + * @return string |
|
| 130 | 130 | */ |
| 131 | 131 | public function getValue() { |
| 132 | 132 | return $this->value; |
@@ -209,6 +209,9 @@ discard block |
||
| 209 | 209 | |
| 210 | 210 | } |
| 211 | 211 | |
| 212 | + /** |
|
| 213 | + * @param string $tableName |
|
| 214 | + */ |
|
| 212 | 215 | public function setTable($tableName) { |
| 213 | 216 | $this->tableName = $tableName; |
| 214 | 217 | } |
@@ -385,9 +385,9 @@ discard block |
||
| 385 | 385 | * it's only advisable to send small files through this method. |
| 386 | 386 | * |
| 387 | 387 | * @static |
| 388 | - * @param $fileData |
|
| 388 | + * @param string $fileData |
|
| 389 | 389 | * @param $fileName |
| 390 | - * @param null $mimeType |
|
| 390 | + * @param string $mimeType |
|
| 391 | 391 | * @return SS_HTTPResponse |
| 392 | 392 | */ |
| 393 | 393 | public static function send_file($fileData, $fileName, $mimeType = null) { |
@@ -605,7 +605,7 @@ discard block |
||
| 605 | 605 | * This is used by the request handler to prevent infinite parsing loops. |
| 606 | 606 | * |
| 607 | 607 | * @param $pattern |
| 608 | - * @return bool |
|
| 608 | + * @return boolean|null |
|
| 609 | 609 | */ |
| 610 | 610 | public function isEmptyPattern($pattern) { |
| 611 | 611 | if(preg_match('/^([A-Za-z]+) +(.*)$/', $pattern, $matches)) { |
@@ -555,6 +555,7 @@ discard block |
||
| 555 | 555 | * Returns the menu title for the given LeftAndMain subclass. |
| 556 | 556 | * Implemented static so that we can get this value without instantiating an object. |
| 557 | 557 | * Menu title is *not* internationalised. |
| 558 | + * @return string |
|
| 558 | 559 | */ |
| 559 | 560 | public static function menu_title_for_class($class) { |
| 560 | 561 | $title = Config::inst()->get($class, 'menu_title', Config::FIRST_SET); |
@@ -720,6 +721,7 @@ discard block |
||
| 720 | 721 | * Return a list of appropriate templates for this class, with the given suffix using |
| 721 | 722 | * {@link SSViewer::get_templates_by_class()} |
| 722 | 723 | * |
| 724 | + * @param string $suffix |
|
| 723 | 725 | * @return array |
| 724 | 726 | */ |
| 725 | 727 | public function getTemplatesWithSuffix($suffix) { |
@@ -1740,7 +1742,7 @@ discard block |
||
| 1740 | 1742 | } |
| 1741 | 1743 | |
| 1742 | 1744 | /** |
| 1743 | - * @return String |
|
| 1745 | + * @return DBField |
|
| 1744 | 1746 | */ |
| 1745 | 1747 | public function Locale() { |
| 1746 | 1748 | return DBField::create_field('DBLocale', i18n::get_locale()); |
@@ -1906,6 +1908,9 @@ discard block |
||
| 1906 | 1908 | return (parent::isFinished() || $this->isFinished); |
| 1907 | 1909 | } |
| 1908 | 1910 | |
| 1911 | + /** |
|
| 1912 | + * @param boolean $bool |
|
| 1913 | + */ |
|
| 1909 | 1914 | public function setIsFinished($bool) { |
| 1910 | 1915 | $this->isFinished = $bool; |
| 1911 | 1916 | } |
@@ -102,7 +102,7 @@ discard block |
||
| 102 | 102 | * Set a different instance than {@link Upload_Validator} |
| 103 | 103 | * for this upload session. |
| 104 | 104 | * |
| 105 | - * @param object $validator |
|
| 105 | + * @param Upload_Validator $validator |
|
| 106 | 106 | */ |
| 107 | 107 | public function setValidator($validator) { |
| 108 | 108 | $this->validator = $validator; |
@@ -223,7 +223,7 @@ discard block |
||
| 223 | 223 | * |
| 224 | 224 | * @param array $tmpFile |
| 225 | 225 | * @param File $file |
| 226 | - * @return Boolean |
|
| 226 | + * @return boolean|string |
|
| 227 | 227 | */ |
| 228 | 228 | public function loadIntoFile($tmpFile, $file, $folderPath = false) { |
| 229 | 229 | $this->file = $file; |
@@ -231,7 +231,8 @@ discard block |
||
| 231 | 231 | } |
| 232 | 232 | |
| 233 | 233 | /** |
| 234 | - * @return Boolean |
|
| 234 | + * @param boolean $bool |
|
| 235 | + * @return boolean|null |
|
| 235 | 236 | */ |
| 236 | 237 | public function setReplaceFile($bool) { |
| 237 | 238 | $this->replaceFile = $bool; |
@@ -295,7 +296,7 @@ discard block |
||
| 295 | 296 | /** |
| 296 | 297 | * Determines wether previous operations caused an error. |
| 297 | 298 | * |
| 298 | - * @return boolean |
|
| 299 | + * @return integer |
|
| 299 | 300 | */ |
| 300 | 301 | public function isError() { |
| 301 | 302 | return (count($this->errors)); |