@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | /** |
50 | 50 | * Assign a new configuration instance or identifier |
51 | 51 | * |
52 | - * @param string|HtmlEditorConfig $config |
|
52 | + * @param string $config |
|
53 | 53 | * @return $this |
54 | 54 | */ |
55 | 55 | public function setEditorConfig($config) { |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | * |
64 | 64 | * @param string $name The internal field name, passed to forms. |
65 | 65 | * @param string $title The human-readable field label. |
66 | - * @param mixed $value The value of the field. |
|
66 | + * @param integer $value The value of the field. |
|
67 | 67 | * @param string $config HtmlEditorConfig identifier to be used. Default to the active one. |
68 | 68 | */ |
69 | 69 | public function __construct($name, $title = null, $value = '', $config = null) { |
@@ -104,6 +104,9 @@ discard block |
||
104 | 104 | $record->{$this->name} = $htmlValue->getContent(); |
105 | 105 | } |
106 | 106 | |
107 | + /** |
|
108 | + * @param string|null $value |
|
109 | + */ |
|
107 | 110 | public function setValue($value) { |
108 | 111 | // Regenerate links prior to preview, so that the editor can see them. |
109 | 112 | $value = Image::regenerate_html_links($value); |
@@ -171,6 +174,10 @@ discard block |
||
171 | 174 | |
172 | 175 | protected $controller, $name; |
173 | 176 | |
177 | + /** |
|
178 | + * @param Controller $controller |
|
179 | + * @param string $name |
|
180 | + */ |
|
174 | 181 | public function __construct($controller, $name) { |
175 | 182 | parent::__construct(); |
176 | 183 | |
@@ -189,7 +196,7 @@ discard block |
||
189 | 196 | /** |
190 | 197 | * Searches the SiteTree for display in the dropdown |
191 | 198 | * |
192 | - * @return callback |
|
199 | + * @return DataList |
|
193 | 200 | */ |
194 | 201 | public function siteTreeSearchCallback($sourceObject, $labelField, $search) { |
195 | 202 | return DataObject::get($sourceObject)->filterAny(array( |
@@ -467,7 +474,7 @@ discard block |
||
467 | 474 | /** |
468 | 475 | * Find all anchors available on the given page. |
469 | 476 | * |
470 | - * @return array |
|
477 | + * @return string |
|
471 | 478 | */ |
472 | 479 | public function getanchors() { |
473 | 480 | $id = (int)$this->getRequest()->getVar('PageID'); |
@@ -1025,7 +1032,7 @@ discard block |
||
1025 | 1032 | /** |
1026 | 1033 | * Get OEmbed type |
1027 | 1034 | * |
1028 | - * @return string |
|
1035 | + * @return boolean |
|
1029 | 1036 | */ |
1030 | 1037 | public function getType() { |
1031 | 1038 | return $this->oembed->type; |
@@ -498,7 +498,7 @@ discard block |
||
498 | 498 | * The callback can opt out of handling specific responses by returning NULL, |
499 | 499 | * in which case the default form behaviour will kick in. |
500 | 500 | * |
501 | - * @param $callback |
|
501 | + * @param Closure $callback |
|
502 | 502 | * @return self |
503 | 503 | */ |
504 | 504 | public function setValidationResponseCallback($callback) { |
@@ -558,7 +558,7 @@ discard block |
||
558 | 558 | /** |
559 | 559 | * Fields can have action to, let's check if anyone of the responds to $funcname them |
560 | 560 | * |
561 | - * @param SS_List|array $fields |
|
561 | + * @param FieldList|null $fields |
|
562 | 562 | * @param callable $funcName |
563 | 563 | * @return FormField |
564 | 564 | */ |
@@ -697,6 +697,7 @@ discard block |
||
697 | 697 | * Set actions that are exempt from validation |
698 | 698 | * |
699 | 699 | * @param array |
700 | + * @param string[] $actions |
|
700 | 701 | */ |
701 | 702 | public function setValidationExemptActions($actions) { |
702 | 703 | $this->validationExemptActions = $actions; |
@@ -836,6 +837,7 @@ discard block |
||
836 | 837 | } |
837 | 838 | |
838 | 839 | /** |
840 | + * @param string $name |
|
839 | 841 | * @return string $name |
840 | 842 | */ |
841 | 843 | public function getAttribute($name) { |
@@ -870,6 +872,7 @@ discard block |
||
870 | 872 | * |
871 | 873 | * @param array Custom attributes to process. Falls back to {@link getAttributes()}. |
872 | 874 | * If at least one argument is passed as a string, all arguments act as excludes by name. |
875 | + * @param string $attrs |
|
873 | 876 | * |
874 | 877 | * @return string HTML attributes, ready for insertion into an HTML tag |
875 | 878 | */ |
@@ -1077,7 +1080,7 @@ discard block |
||
1077 | 1080 | * If set to false (the default), then the form method is only used to construct the default |
1078 | 1081 | * form. |
1079 | 1082 | * |
1080 | - * @param $bool boolean |
|
1083 | + * @param boolean $bool boolean |
|
1081 | 1084 | * @return $this |
1082 | 1085 | */ |
1083 | 1086 | public function setStrictFormMethodCheck($bool) { |
@@ -1592,7 +1595,7 @@ discard block |
||
1592 | 1595 | * This is returned when you access a form as $FormObject rather |
1593 | 1596 | * than <% with FormObject %> |
1594 | 1597 | * |
1595 | - * @return HTML |
|
1598 | + * @return DBField |
|
1596 | 1599 | */ |
1597 | 1600 | public function forTemplate() { |
1598 | 1601 | $return = $this->renderWith(array_merge( |
@@ -1612,7 +1615,7 @@ discard block |
||
1612 | 1615 | * It triggers slightly different behaviour, such as disabling the rewriting |
1613 | 1616 | * of # links. |
1614 | 1617 | * |
1615 | - * @return HTML |
|
1618 | + * @return DBField |
|
1616 | 1619 | */ |
1617 | 1620 | public function forAjaxTemplate() { |
1618 | 1621 | $view = new SSViewer(array( |
@@ -1635,7 +1638,7 @@ discard block |
||
1635 | 1638 | * and _form_enctype. These are the attributes of the form. These fields |
1636 | 1639 | * can be used to send the form to Ajax. |
1637 | 1640 | * |
1638 | - * @return HTML |
|
1641 | + * @return string |
|
1639 | 1642 | */ |
1640 | 1643 | public function formHtmlContent() { |
1641 | 1644 | $this->IncludeFormTag = false; |
@@ -1896,6 +1899,9 @@ discard block |
||
1896 | 1899 | |
1897 | 1900 | protected $form; |
1898 | 1901 | |
1902 | + /** |
|
1903 | + * @param Form $form |
|
1904 | + */ |
|
1899 | 1905 | public function __construct($form) { |
1900 | 1906 | $this->form = $form; |
1901 | 1907 | parent::__construct(); |
@@ -59,7 +59,7 @@ |
||
59 | 59 | * Returns a <select> tag containing all the appropriate <option> tags |
60 | 60 | * |
61 | 61 | * @param array $properties |
62 | - * @return string |
|
62 | + * @return DBField |
|
63 | 63 | */ |
64 | 64 | public function Field($properties = array()) { |
65 | 65 | $properties = array_merge($properties, array( |
@@ -36,6 +36,10 @@ discard block |
||
36 | 36 | */ |
37 | 37 | protected $fieldCurrency = null; |
38 | 38 | |
39 | + /** |
|
40 | + * @param string $name |
|
41 | + * @param string $title |
|
42 | + */ |
|
39 | 43 | public function __construct($name, $title = null, $value = "") { |
40 | 44 | // naming with underscores to prevent values from actually being saved somewhere |
41 | 45 | $this->fieldAmount = new NumericField("{$name}[Amount]", _t('MoneyField.FIELDLABELAMOUNT', 'Amount')); |
@@ -46,7 +50,7 @@ discard block |
||
46 | 50 | |
47 | 51 | /** |
48 | 52 | * @param array |
49 | - * @return HTMLText |
|
53 | + * @return DBField |
|
50 | 54 | */ |
51 | 55 | public function Field($properties = array()) { |
52 | 56 | return DBField::create_field('HTMLText', |
@@ -139,6 +143,7 @@ discard block |
||
139 | 143 | /** |
140 | 144 | * @todo Implement removal of readonly state with $bool=false |
141 | 145 | * @todo Set readonly state whenever field is recreated, e.g. in setAllowedCurrencies() |
146 | + * @param boolean $bool |
|
142 | 147 | */ |
143 | 148 | public function setReadonly($bool) { |
144 | 149 | parent::setReadonly($bool); |
@@ -144,7 +144,7 @@ discard block |
||
144 | 144 | /** |
145 | 145 | * Get the current failover object if set |
146 | 146 | * |
147 | - * @return ViewableData|null |
|
147 | + * @return ViewableData |
|
148 | 148 | */ |
149 | 149 | public function getFailover() { |
150 | 150 | return $this->failover; |
@@ -211,8 +211,6 @@ discard block |
||
211 | 211 | /** |
212 | 212 | * Method to facilitate deprecation of underscore-prefixed methods automatically being cached. |
213 | 213 | * |
214 | - * @param string $field |
|
215 | - * @param array $arguments |
|
216 | 214 | * @param string $identifier an optional custom cache identifier |
217 | 215 | * @return unknown |
218 | 216 | */ |
@@ -273,7 +271,7 @@ discard block |
||
273 | 271 | * - castingHelper: the casting helper for casting the field (e.g. "return new Varchar($fieldName)") |
274 | 272 | * |
275 | 273 | * @param string $field |
276 | - * @return array |
|
274 | + * @return string |
|
277 | 275 | */ |
278 | 276 | public function castingHelperPair($field) { |
279 | 277 | Deprecation::notice('2.5', 'use castingHelper() instead'); |
@@ -365,7 +363,7 @@ discard block |
||
365 | 363 | * |
366 | 364 | * @param string|array|SSViewer $template the template to render into |
367 | 365 | * @param array $customFields fields to customise() the object with before rendering |
368 | - * @return HTMLText |
|
366 | + * @return DBField |
|
369 | 367 | */ |
370 | 368 | public function renderWith($template, $customFields = null) { |
371 | 369 | if(!is_object($template)) { |
@@ -525,6 +523,7 @@ discard block |
||
525 | 523 | |
526 | 524 | /** |
527 | 525 | * Return the value of a field in an SQL-safe format. |
526 | + * @param string $field |
|
528 | 527 | */ |
529 | 528 | public function SQL_val($field, $arguments = null, $cache = true) { |
530 | 529 | return Convert::raw2sql($this->RAW_val($field, $arguments, $cache)); |
@@ -532,6 +531,7 @@ discard block |
||
532 | 531 | |
533 | 532 | /** |
534 | 533 | * Return the value of a field in a JavaScript-save format. |
534 | + * @param string $field |
|
535 | 535 | */ |
536 | 536 | public function JS_val($field, $arguments = null, $cache = true) { |
537 | 537 | return Convert::raw2js($this->RAW_val($field, $arguments, $cache)); |
@@ -539,6 +539,7 @@ discard block |
||
539 | 539 | |
540 | 540 | /** |
541 | 541 | * Return the value of a field escaped suitable to be inserted into an XML node attribute. |
542 | + * @param string $field |
|
542 | 543 | */ |
543 | 544 | public function ATT_val($field, $arguments = null, $cache = true) { |
544 | 545 | return Convert::raw2att($this->RAW_val($field, $arguments, $cache)); |
@@ -549,7 +550,6 @@ discard block |
||
549 | 550 | /** |
550 | 551 | * Get an array of XML-escaped values by field name |
551 | 552 | * |
552 | - * @param array $elements an array of field names |
|
553 | 553 | * @return array |
554 | 554 | */ |
555 | 555 | public function getXMLValues($fields) { |
@@ -248,7 +248,7 @@ discard block |
||
248 | 248 | * |
249 | 249 | * @param array $args Array of input shortcode arguments |
250 | 250 | * @param int $errorCode If the file is not found, or is inaccessible, this will be assigned to a HTTP error code. |
251 | - * @return File|null The File DataObject, if it can be found. |
|
251 | + * @return null|DataObject The File DataObject, if it can be found. |
|
252 | 252 | */ |
253 | 253 | public static function find_shortcode_record($args, &$errorCode = null) { |
254 | 254 | // Validate shortcode |
@@ -617,7 +617,7 @@ discard block |
||
617 | 617 | * |
618 | 618 | * @param string $condition The PHP condition to be evaluated. The page will be called $item |
619 | 619 | * @param array $collator An array, passed by reference, to collect all of the matching descendants. |
620 | - * @return true|null |
|
620 | + * @return boolean|null |
|
621 | 621 | */ |
622 | 622 | public function collateDescendants($condition, &$collator) { |
623 | 623 | if($children = $this->Children()) { |
@@ -978,6 +978,7 @@ discard block |
||
978 | 978 | * |
979 | 979 | * @param String File extension, without dot prefix. Use an asterisk ('*') |
980 | 980 | * to specify a generic fallback if no mapping is found for an extension. |
981 | + * @param string $ext |
|
981 | 982 | * @return String Classname for a subclass of {@link File} |
982 | 983 | */ |
983 | 984 | public static function get_class_for_file_extension($ext) { |
@@ -1115,7 +1116,6 @@ discard block |
||
1115 | 1116 | * Note that the result will not have a leading slash, and should not be used |
1116 | 1117 | * with local file paths. |
1117 | 1118 | * |
1118 | - * @param string $part,... Parts |
|
1119 | 1119 | * @return string |
1120 | 1120 | */ |
1121 | 1121 | public static function join_paths() { |
@@ -59,7 +59,7 @@ |
||
59 | 59 | /** |
60 | 60 | * Set the owner of this extension. |
61 | 61 | * |
62 | - * @param Object $owner The owner object, |
|
62 | + * @param null|DataObject $owner The owner object, |
|
63 | 63 | * @param string $ownerBaseClass The base class that the extension is applied to; this may be |
64 | 64 | * the class of owner, or it may be a parent. For example, if Versioned was applied to SiteTree, |
65 | 65 | * and then a Page object was instantiated, $owner would be a Page object, but $ownerBaseClass |
@@ -551,8 +551,8 @@ discard block |
||
551 | 551 | |
552 | 552 | /** |
553 | 553 | * Helper function to duplicate relations from one object to another |
554 | - * @param $sourceObject the source object to duplicate from |
|
555 | - * @param $destinationObject the destination object to populate with the duplicated relations |
|
554 | + * @param DataObject $sourceObject the source object to duplicate from |
|
555 | + * @param DataObject $destinationObject the destination object to populate with the duplicated relations |
|
556 | 556 | * @param $name the name of the relation to duplicate (e.g. members) |
557 | 557 | */ |
558 | 558 | private function duplicateRelations($sourceObject, $destinationObject, $name) { |
@@ -932,6 +932,7 @@ discard block |
||
932 | 932 | * @param $includeRelations Boolean Merge any existing relations (optional) |
933 | 933 | * @param $overwriteWithEmpty Boolean Overwrite existing left values with empty right values. |
934 | 934 | * Only applicable with $priority='right'. (optional) |
935 | + * @param DataObject|null $rightObj |
|
935 | 936 | * @return Boolean |
936 | 937 | */ |
937 | 938 | public function merge($rightObj, $priority = 'right', $includeRelations = true, $overwriteWithEmpty = false) { |
@@ -2201,6 +2202,7 @@ discard block |
||
2201 | 2202 | * |
2202 | 2203 | * This is experimental, and is currently only a Postgres-specific enhancement. |
2203 | 2204 | * |
2205 | + * @param string $class |
|
2204 | 2206 | * @return array or false |
2205 | 2207 | */ |
2206 | 2208 | public function database_extensions($class){ |
@@ -3009,7 +3011,7 @@ discard block |
||
3009 | 3011 | * Traverses to a field referenced by relationships between data objects, returning the value |
3010 | 3012 | * The path to the related field is specified with dot separated syntax (eg: Parent.Child.Child.FieldName) |
3011 | 3013 | * |
3012 | - * @param $fieldName string |
|
3014 | + * @param string $fieldName string |
|
3013 | 3015 | * @return string | null - will return null on a missing value |
3014 | 3016 | */ |
3015 | 3017 | public function relField($fieldName) { |
@@ -3078,7 +3080,7 @@ discard block |
||
3078 | 3080 | * @param string $callerClass The class of objects to be returned |
3079 | 3081 | * @param string|array $filter A filter to be inserted into the WHERE clause. |
3080 | 3082 | * Supports parameterised queries. See SQLSelect::addWhere() for syntax examples. |
3081 | - * @param string|array $sort A sort expression to be inserted into the ORDER |
|
3083 | + * @param string $sort A sort expression to be inserted into the ORDER |
|
3082 | 3084 | * BY clause. If omitted, self::$default_sort will be used. |
3083 | 3085 | * @param string $join Deprecated 3.0 Join clause. Use leftJoin($table, $joinClause) instead. |
3084 | 3086 | * @param string|array $limit A limit expression to be inserted into the LIMIT clause. |
@@ -3288,6 +3290,8 @@ discard block |
||
3288 | 3290 | /** |
3289 | 3291 | * @see $sourceQueryParams |
3290 | 3292 | * @param array |
3293 | + * @param string $key |
|
3294 | + * @param string $value |
|
3291 | 3295 | */ |
3292 | 3296 | public function setSourceQueryParam($key, $value) { |
3293 | 3297 | $this->sourceQueryParams[$key] = $value; |
@@ -3295,6 +3299,7 @@ discard block |
||
3295 | 3299 | |
3296 | 3300 | /** |
3297 | 3301 | * @see $sourceQueryParams |
3302 | + * @param string $key |
|
3298 | 3303 | * @return Mixed |
3299 | 3304 | */ |
3300 | 3305 | public function getSourceQueryParam($key) { |