@@ -23,8 +23,6 @@ |
||
| 23 | 23 | * $list = DataList::create('SiteTree'); |
| 24 | 24 | * $list = SiteTree::get(); |
| 25 | 25 | * |
| 26 | - * @param string $class the class name |
|
| 27 | - * @param mixed $arguments,... arguments to pass to the constructor |
|
| 28 | 26 | * @return static |
| 29 | 27 | */ |
| 30 | 28 | public static function create() { |
@@ -127,7 +127,7 @@ discard block |
||
| 127 | 127 | * Find version of this object in the given stage |
| 128 | 128 | * |
| 129 | 129 | * @param string $stage |
| 130 | - * @return Versioned|DataObject |
|
| 130 | + * @return DataObject|null |
|
| 131 | 131 | */ |
| 132 | 132 | protected function getObjectInStage($stage) { |
| 133 | 133 | return Versioned::get_by_stage($this->ObjectClass, $stage)->byID($this->ObjectID); |
@@ -136,7 +136,7 @@ discard block |
||
| 136 | 136 | /** |
| 137 | 137 | * Find latest version of this object |
| 138 | 138 | * |
| 139 | - * @return Versioned|DataObject |
|
| 139 | + * @return DataObject|null |
|
| 140 | 140 | */ |
| 141 | 141 | protected function getObjectLatestVersion() { |
| 142 | 142 | return Versioned::get_latest_version($this->ObjectClass, $this->ObjectID); |
@@ -65,6 +65,7 @@ discard block |
||
| 65 | 65 | * while automatically busting this cache every time the file is changed. |
| 66 | 66 | * |
| 67 | 67 | * @param bool |
| 68 | + * @param boolean $var |
|
| 68 | 69 | */ |
| 69 | 70 | public static function set_suffix_requirements($var) { |
| 70 | 71 | self::backend()->setSuffixRequirements($var); |
@@ -336,7 +337,7 @@ discard block |
||
| 336 | 337 | * </code> |
| 337 | 338 | * |
| 338 | 339 | * @param string $combinedFileName Filename of the combined file relative to docroot |
| 339 | - * @param array $files Array of filenames relative to docroot |
|
| 340 | + * @param string[] $files Array of filenames relative to docroot |
|
| 340 | 341 | * @param string $media |
| 341 | 342 | * |
| 342 | 343 | * @return bool|void |
@@ -761,6 +762,7 @@ discard block |
||
| 761 | 762 | * Forces the JavaScript requirements to the end of the body, right before the closing tag |
| 762 | 763 | * |
| 763 | 764 | * @param bool |
| 765 | + * @param boolean $var |
|
| 764 | 766 | * @return $this |
| 765 | 767 | */ |
| 766 | 768 | public function setForceJSToBottom($var) { |
@@ -88,7 +88,7 @@ |
||
| 88 | 88 | * Add this callback to the chain of callbacks to call along with the state |
| 89 | 89 | * that $error must be in this point in the chain for the callback to be called |
| 90 | 90 | * |
| 91 | - * @param $callback - The callback to call |
|
| 91 | + * @param callable $callback - The callback to call |
|
| 92 | 92 | * @param $onErrorState - false if only call if no errors yet, true if only call if already errors, null for either |
| 93 | 93 | * @return $this |
| 94 | 94 | */ |
@@ -199,7 +199,7 @@ discard block |
||
| 199 | 199 | * |
| 200 | 200 | * @todo refactor this into GridFieldComponent |
| 201 | 201 | * |
| 202 | - * @param mixed $value |
|
| 202 | + * @param string $value |
|
| 203 | 203 | * @param string|array $castingDefinition |
| 204 | 204 | * |
| 205 | 205 | * @return mixed |
@@ -286,7 +286,7 @@ discard block |
||
| 286 | 286 | * |
| 287 | 287 | * @param array $properties |
| 288 | 288 | * |
| 289 | - * @return HTMLText |
|
| 289 | + * @return DBField |
|
| 290 | 290 | */ |
| 291 | 291 | public function FieldHolder($properties = array()) { |
| 292 | 292 | Requirements::css(THIRDPARTY_DIR . '/jquery-ui-themes/smoothness/jquery-ui.css'); |
@@ -600,7 +600,7 @@ discard block |
||
| 600 | 600 | /** |
| 601 | 601 | * @param array $properties |
| 602 | 602 | * |
| 603 | - * @return HTMLText |
|
| 603 | + * @return DBField |
|
| 604 | 604 | */ |
| 605 | 605 | public function Field($properties = array()) { |
| 606 | 606 | $this->extend('onBeforeRender', $this); |
@@ -379,7 +379,7 @@ discard block |
||
| 379 | 379 | * |
| 380 | 380 | * Note that columns may be double quoted as per ANSI sql standard |
| 381 | 381 | * |
| 382 | - * @return DataList |
|
| 382 | + * @return ArrayList |
|
| 383 | 383 | * @see SS_List::sort() |
| 384 | 384 | * @example $list->sort('Name'); // default ASC sorting |
| 385 | 385 | * @example $list->sort('Name DESC'); // DESC sorting |
@@ -515,7 +515,7 @@ discard block |
||
| 515 | 515 | * $list = $list->filterAny(array('Name'=>array('bob','phil'), 'Age'=>array(21, 43))); |
| 516 | 516 | * |
| 517 | 517 | * @param string|array See {@link filter()} |
| 518 | - * @return DataList |
|
| 518 | + * @return ArrayList |
|
| 519 | 519 | */ |
| 520 | 520 | public function filterAny() { |
| 521 | 521 | $keepUs = call_user_func_array(array($this, 'normaliseFilterArgs'), func_get_args()); |
@@ -582,6 +582,9 @@ discard block |
||
| 582 | 582 | return $this->filter('ID', $ids); |
| 583 | 583 | } |
| 584 | 584 | |
| 585 | + /** |
|
| 586 | + * @param integer $id |
|
| 587 | + */ |
|
| 585 | 588 | public function byID($id) { |
| 586 | 589 | $firstElement = $this->filter("ID", $id)->first(); |
| 587 | 590 | |
@@ -666,7 +669,6 @@ discard block |
||
| 666 | 669 | /** |
| 667 | 670 | * Returns whether an item with $key exists |
| 668 | 671 | * |
| 669 | - * @param mixed $key |
|
| 670 | 672 | * @return bool |
| 671 | 673 | */ |
| 672 | 674 | public function offsetExists($offset) { |
@@ -676,7 +678,6 @@ discard block |
||
| 676 | 678 | /** |
| 677 | 679 | * Returns item stored in list with index $key |
| 678 | 680 | * |
| 679 | - * @param mixed $key |
|
| 680 | 681 | * @return DataObject |
| 681 | 682 | */ |
| 682 | 683 | public function offsetGet($offset) { |
@@ -686,7 +687,6 @@ discard block |
||
| 686 | 687 | /** |
| 687 | 688 | * Set an item with the key in $key |
| 688 | 689 | * |
| 689 | - * @param mixed $key |
|
| 690 | 690 | * @param mixed $value |
| 691 | 691 | */ |
| 692 | 692 | public function offsetSet($offset, $value) { |
@@ -700,7 +700,6 @@ discard block |
||
| 700 | 700 | /** |
| 701 | 701 | * Unset an item with the key in $key |
| 702 | 702 | * |
| 703 | - * @param mixed $key |
|
| 704 | 703 | */ |
| 705 | 704 | public function offsetUnset($offset) { |
| 706 | 705 | unset($this->items[$offset]); |
@@ -46,6 +46,7 @@ discard block |
||
| 46 | 46 | * |
| 47 | 47 | * @param $url Human-readable URL. |
| 48 | 48 | * @returns string/bool URL of an endpoint, or false if no matching provider exists. |
| 49 | + * @return string |
|
| 49 | 50 | */ |
| 50 | 51 | protected static function find_endpoint($url) { |
| 51 | 52 | foreach(self::get_providers() as $scheme=>$endpoint) { |
@@ -117,7 +118,7 @@ discard block |
||
| 117 | 118 | * Given a response body, determine if there is an autodiscover url |
| 118 | 119 | * |
| 119 | 120 | * @param string $body |
| 120 | - * @return bool|string |
|
| 121 | + * @return string|false |
|
| 121 | 122 | */ |
| 122 | 123 | public static function autodiscover_from_body($body) { |
| 123 | 124 | // Look within the body for an oembed link. |
@@ -355,6 +356,7 @@ discard block |
||
| 355 | 356 | |
| 356 | 357 | /** |
| 357 | 358 | * Wrap the check for looking into Oembed JSON within $this->data. |
| 359 | + * @param string $field |
|
| 358 | 360 | */ |
| 359 | 361 | public function hasField($field) { |
| 360 | 362 | $this->loadData(); |
@@ -186,7 +186,7 @@ discard block |
||
| 186 | 186 | /** |
| 187 | 187 | * Gets the combined configuration of all LeafAndMain subclasses required by the client app. |
| 188 | 188 | * |
| 189 | - * @return array |
|
| 189 | + * @return string |
|
| 190 | 190 | * |
| 191 | 191 | * WARNING: Experimental API |
| 192 | 192 | */ |
@@ -876,6 +876,7 @@ discard block |
||
| 876 | 876 | * Return a list of appropriate templates for this class, with the given suffix using |
| 877 | 877 | * {@link SSViewer::get_templates_by_class()} |
| 878 | 878 | * |
| 879 | + * @param string $suffix |
|
| 879 | 880 | * @return array |
| 880 | 881 | */ |
| 881 | 882 | public function getTemplatesWithSuffix($suffix) { |
@@ -1745,7 +1746,7 @@ discard block |
||
| 1745 | 1746 | * The controller might not have any previewable content, in which case |
| 1746 | 1747 | * this method returns FALSE. |
| 1747 | 1748 | * |
| 1748 | - * @return String|boolean |
|
| 1749 | + * @return boolean |
|
| 1749 | 1750 | */ |
| 1750 | 1751 | public function LinkPreview() { |
| 1751 | 1752 | return false; |
@@ -1932,7 +1933,7 @@ discard block |
||
| 1932 | 1933 | } |
| 1933 | 1934 | |
| 1934 | 1935 | /** |
| 1935 | - * @return String |
|
| 1936 | + * @return DBField |
|
| 1936 | 1937 | */ |
| 1937 | 1938 | public function Locale() { |
| 1938 | 1939 | return DBField::create_field('Locale', i18n::get_locale()); |
@@ -2098,6 +2099,9 @@ discard block |
||
| 2098 | 2099 | return (parent::isFinished() || $this->isFinished); |
| 2099 | 2100 | } |
| 2100 | 2101 | |
| 2102 | + /** |
|
| 2103 | + * @param boolean $bool |
|
| 2104 | + */ |
|
| 2101 | 2105 | public function setIsFinished($bool) { |
| 2102 | 2106 | $this->isFinished = $bool; |
| 2103 | 2107 | } |
@@ -45,6 +45,7 @@ discard block |
||
| 45 | 45 | * Create a new DataQuery. |
| 46 | 46 | * |
| 47 | 47 | * @param String The name of the DataObject class that you wish to query |
| 48 | + * @param string $dataClass |
|
| 48 | 49 | */ |
| 49 | 50 | public function __construct($dataClass) { |
| 50 | 51 | $this->dataClass = $dataClass; |
@@ -167,7 +168,7 @@ discard block |
||
| 167 | 168 | /** |
| 168 | 169 | * Ensure that the query is ready to execute. |
| 169 | 170 | * |
| 170 | - * @param array|null $queriedColumns Any columns to filter the query by |
|
| 171 | + * @param string[] $queriedColumns Any columns to filter the query by |
|
| 171 | 172 | * @return SQLSelect The finalised sql query |
| 172 | 173 | */ |
| 173 | 174 | public function getFinalisedQuery($queriedColumns = null) { |
@@ -924,6 +925,7 @@ discard block |
||
| 924 | 925 | |
| 925 | 926 | /** |
| 926 | 927 | * Set an arbitrary query parameter, that can be used by decorators to add additional meta-data to the query. |
| 928 | + * @param string $key |
|
| 927 | 929 | */ |
| 928 | 930 | public function getQueryParam($key) { |
| 929 | 931 | if(isset($this->queryParams[$key])) return $this->queryParams[$key]; |
@@ -956,6 +958,9 @@ discard block |
||
| 956 | 958 | */ |
| 957 | 959 | protected $whereQuery; |
| 958 | 960 | |
| 961 | + /** |
|
| 962 | + * @param string $connective |
|
| 963 | + */ |
|
| 959 | 964 | public function __construct(DataQuery $base, $connective) { |
| 960 | 965 | $this->dataClass = $base->dataClass; |
| 961 | 966 | $this->query = $base->query; |
@@ -965,6 +970,9 @@ discard block |
||
| 965 | 970 | $base->where($this); |
| 966 | 971 | } |
| 967 | 972 | |
| 973 | + /** |
|
| 974 | + * @param string $filter |
|
| 975 | + */ |
|
| 968 | 976 | public function where($filter) { |
| 969 | 977 | if($filter) { |
| 970 | 978 | $this->whereQuery->addWhere($filter); |