@@ -234,7 +234,7 @@ discard block |
||
| 234 | 234 | * Find a File object by the given filename. |
| 235 | 235 | * |
| 236 | 236 | * @param String $filename Matched against the "Name" property. |
| 237 | - * @return mixed null if not found, File object of found file |
|
| 237 | + * @return null|DataObject null if not found, File object of found file |
|
| 238 | 238 | */ |
| 239 | 239 | public static function find($filename) { |
| 240 | 240 | // Get the base file if $filename points to a resampled file |
@@ -449,6 +449,7 @@ discard block |
||
| 449 | 449 | * showing icons on filelinks, etc. |
| 450 | 450 | * Possible group values are: "audio", "mov", "zip", "image". |
| 451 | 451 | * |
| 452 | + * @param string $ext |
|
| 452 | 453 | * @return String |
| 453 | 454 | */ |
| 454 | 455 | public static function get_app_category($ext) { |
@@ -872,7 +873,6 @@ discard block |
||
| 872 | 873 | /** |
| 873 | 874 | * Convert a php.ini value (eg: 512M) to bytes |
| 874 | 875 | * |
| 875 | - * @param string $phpIniValue |
|
| 876 | 876 | * @return int |
| 877 | 877 | */ |
| 878 | 878 | public static function ini2bytes($PHPiniValue) { |
@@ -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; |
@@ -115,7 +115,7 @@ discard block |
||
| 115 | 115 | * |
| 116 | 116 | * @param $tmpFile array Indexed array that PHP generated for every file it uploads. |
| 117 | 117 | * @param $folderPath string Folder path relative to /assets |
| 118 | - * @return Boolean|string Either success or error-message. |
|
| 118 | + * @return boolean Either success or error-message. |
|
| 119 | 119 | */ |
| 120 | 120 | public function load($tmpFile, $folderPath = false) { |
| 121 | 121 | $this->clearErrors(); |
@@ -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)); |
@@ -164,6 +164,7 @@ discard block |
||
| 164 | 164 | |
| 165 | 165 | /** |
| 166 | 166 | * @param String |
| 167 | + * @param string $class |
|
| 167 | 168 | */ |
| 168 | 169 | public function setItemRequestClass($class) { |
| 169 | 170 | $this->itemRequestClass = $class; |
@@ -271,6 +272,9 @@ discard block |
||
| 271 | 272 | parent::__construct(); |
| 272 | 273 | } |
| 273 | 274 | |
| 275 | + /** |
|
| 276 | + * @param string $action |
|
| 277 | + */ |
|
| 274 | 278 | public function Link($action = null) { |
| 275 | 279 | return Controller::join_links($this->gridField->Link('item'), |
| 276 | 280 | $this->record->ID ? $this->record->ID : 'new', $action); |
@@ -299,6 +303,9 @@ discard block |
||
| 299 | 303 | } |
| 300 | 304 | } |
| 301 | 305 | |
| 306 | + /** |
|
| 307 | + * @param SS_HTTPRequest $request |
|
| 308 | + */ |
|
| 302 | 309 | public function edit($request) { |
| 303 | 310 | $controller = $this->getToplevelController(); |
| 304 | 311 | $form = $this->ItemEditForm($this->gridField, $request); |
@@ -202,7 +202,6 @@ discard block |
||
| 202 | 202 | * @param string $title The field label. |
| 203 | 203 | * @param SS_List $items If no items are defined, the field will try to auto-detect an existing relation on |
| 204 | 204 | * @link $record}, with the same name as the field name. |
| 205 | - * @param Form $form Reference to the container form |
|
| 206 | 205 | */ |
| 207 | 206 | public function __construct($name, $title = null, SS_List $items = null) { |
| 208 | 207 | |
@@ -1052,7 +1051,7 @@ discard block |
||
| 1052 | 1051 | |
| 1053 | 1052 | /** |
| 1054 | 1053 | * @param SS_HTTPRequest $request |
| 1055 | - * @return UploadField_ItemHandler |
|
| 1054 | + * @return UploadField_SelectHandler |
|
| 1056 | 1055 | */ |
| 1057 | 1056 | public function handleSelect(SS_HTTPRequest $request) { |
| 1058 | 1057 | if(!$this->canAttachExisting()) return $this->httpError(403); |
@@ -1341,7 +1340,7 @@ discard block |
||
| 1341 | 1340 | |
| 1342 | 1341 | /** |
| 1343 | 1342 | * @param UploadFIeld $parent |
| 1344 | - * @param int $item |
|
| 1343 | + * @param int $itemID |
|
| 1345 | 1344 | */ |
| 1346 | 1345 | public function __construct($parent, $itemID) { |
| 1347 | 1346 | $this->parent = $parent; |
@@ -1410,7 +1409,7 @@ discard block |
||
| 1410 | 1409 | * Action to handle editing of a single file |
| 1411 | 1410 | * |
| 1412 | 1411 | * @param SS_HTTPRequest $request |
| 1413 | - * @return ViewableData_Customised |
|
| 1412 | + * @return HTMLText |
|
| 1414 | 1413 | */ |
| 1415 | 1414 | public function edit(SS_HTTPRequest $request) { |
| 1416 | 1415 | // Check form field state |
@@ -157,7 +157,7 @@ discard block |
||
| 157 | 157 | * Returns a new DataList instance with the specified query parameter assigned |
| 158 | 158 | * |
| 159 | 159 | * @param string|array $keyOrArray Either the single key to set, or an array of key value pairs to set |
| 160 | - * @param mixed $val If $keyOrArray is not an array, this is the value to set |
|
| 160 | + * @param string $val If $keyOrArray is not an array, this is the value to set |
|
| 161 | 161 | * @return DataList |
| 162 | 162 | */ |
| 163 | 163 | public function setDataQueryParam($keyOrArray, $val = null) { |
@@ -616,7 +616,7 @@ discard block |
||
| 616 | 616 | * @param int $order A numerical index to control the order that joins are added to the query; lower order values |
| 617 | 617 | * will cause the query to appear first. The default is 20, and joins created automatically by the |
| 618 | 618 | * ORM have a value of 10. |
| 619 | - * @param array $parameters Any additional parameters if the join is a parameterised subquery |
|
| 619 | + * @param string[] $parameters Any additional parameters if the join is a parameterised subquery |
|
| 620 | 620 | * @return DataList |
| 621 | 621 | */ |
| 622 | 622 | public function innerJoin($table, $onClause, $alias = null, $order = 20, $parameters = array()) { |
@@ -634,7 +634,7 @@ discard block |
||
| 634 | 634 | * @param int $order A numerical index to control the order that joins are added to the query; lower order values |
| 635 | 635 | * will cause the query to appear first. The default is 20, and joins created automatically by the |
| 636 | 636 | * ORM have a value of 10. |
| 637 | - * @param array $parameters Any additional parameters if the join is a parameterised subquery |
|
| 637 | + * @param string[] $parameters Any additional parameters if the join is a parameterised subquery |
|
| 638 | 638 | * @return DataList |
| 639 | 639 | */ |
| 640 | 640 | public function leftJoin($table, $onClause, $alias = null, $order = 20, $parameters = array()) { |
@@ -761,7 +761,7 @@ discard block |
||
| 761 | 761 | * Return the maximum value of the given field in this DataList |
| 762 | 762 | * |
| 763 | 763 | * @param string $fieldName |
| 764 | - * @return mixed |
|
| 764 | + * @return string |
|
| 765 | 765 | */ |
| 766 | 766 | public function max($fieldName) { |
| 767 | 767 | return $this->dataQuery->max($fieldName); |
@@ -771,7 +771,7 @@ discard block |
||
| 771 | 771 | * Return the minimum value of the given field in this DataList |
| 772 | 772 | * |
| 773 | 773 | * @param string $fieldName |
| 774 | - * @return mixed |
|
| 774 | + * @return string |
|
| 775 | 775 | */ |
| 776 | 776 | public function min($fieldName) { |
| 777 | 777 | return $this->dataQuery->min($fieldName); |
@@ -781,7 +781,7 @@ discard block |
||
| 781 | 781 | * Return the average value of the given field in this DataList |
| 782 | 782 | * |
| 783 | 783 | * @param string $fieldName |
| 784 | - * @return mixed |
|
| 784 | + * @return string |
|
| 785 | 785 | */ |
| 786 | 786 | public function avg($fieldName) { |
| 787 | 787 | return $this->dataQuery->avg($fieldName); |
@@ -791,7 +791,7 @@ discard block |
||
| 791 | 791 | * Return the sum of the values of the given field in this DataList |
| 792 | 792 | * |
| 793 | 793 | * @param string $fieldName |
| 794 | - * @return mixed |
|
| 794 | + * @return string |
|
| 795 | 795 | */ |
| 796 | 796 | public function sum($fieldName) { |
| 797 | 797 | return $this->dataQuery->sum($fieldName); |
@@ -843,7 +843,7 @@ discard block |
||
| 843 | 843 | /** |
| 844 | 844 | * Restrict the columns to fetch into this DataList |
| 845 | 845 | * |
| 846 | - * @param array $queriedColumns |
|
| 846 | + * @param string[] $queriedColumns |
|
| 847 | 847 | * @return DataList |
| 848 | 848 | */ |
| 849 | 849 | public function setQueriedColumns($queriedColumns) { |
@@ -1116,7 +1116,7 @@ discard block |
||
| 1116 | 1116 | /** |
| 1117 | 1117 | * Returns item stored in list with index $key |
| 1118 | 1118 | * |
| 1119 | - * @param mixed $key |
|
| 1119 | + * @param integer $key |
|
| 1120 | 1120 | * @return DataObject |
| 1121 | 1121 | */ |
| 1122 | 1122 | public function offsetGet($key) { |
@@ -304,6 +304,10 @@ |
||
| 304 | 304 | // Delete files in the default uploads directory that match the name pattern. |
| 305 | 305 | // @param String $namePattern A regular expression applied to files in the directory. If the name matches |
| 306 | 306 | // the pattern, it is deleted. Directories, . and .. are excluded. |
| 307 | + |
|
| 308 | + /** |
|
| 309 | + * @param string $namePattern |
|
| 310 | + */ |
|
| 307 | 311 | public function deleteTestUploadFiles($namePattern) { |
| 308 | 312 | $tmpFolder = ASSETS_PATH . "/" . Config::inst()->get('Upload', 'uploads_folder'); |
| 309 | 313 | $files = scandir($tmpFolder); |
@@ -55,7 +55,7 @@ discard block |
||
| 55 | 55 | |
| 56 | 56 | /** |
| 57 | 57 | * Get a configuration accessor for this class. Short hand for Config::inst()->get($this->class, .....). |
| 58 | - * @return Config_ForClass|null |
|
| 58 | + * @return Config_ForClass |
|
| 59 | 59 | */ |
| 60 | 60 | static public function config() { |
| 61 | 61 | return Config::inst()->forClass(get_called_class()); |
@@ -125,8 +125,6 @@ discard block |
||
| 125 | 125 | * $list = DataList::create('SiteTree'); |
| 126 | 126 | * $list = SiteTree::get(); |
| 127 | 127 | * |
| 128 | - * @param string $class the class name |
|
| 129 | - * @param mixed $arguments,... arguments to pass to the constructor |
|
| 130 | 128 | * @return static |
| 131 | 129 | */ |
| 132 | 130 | public static function create() { |
@@ -149,7 +147,6 @@ discard block |
||
| 149 | 147 | * way to access instance methods which don't rely on instance |
| 150 | 148 | * data (e.g. the custom SilverStripe static handling). |
| 151 | 149 | * |
| 152 | - * @param string $className Optional classname (if called on Object directly) |
|
| 153 | 150 | * @return static The singleton instance |
| 154 | 151 | */ |
| 155 | 152 | public static function singleton() { |
@@ -297,8 +294,6 @@ discard block |
||
| 297 | 294 | * Similar to {@link Object::create()}, except that classes are only overloaded if you set the $strong parameter to |
| 298 | 295 | * TRUE when using {@link Object::useCustomClass()} |
| 299 | 296 | * |
| 300 | - * @param string $class the class name |
|
| 301 | - * @param mixed $arguments,... arguments to pass to the constructor |
|
| 302 | 297 | * @return static |
| 303 | 298 | */ |
| 304 | 299 | public static function strong_create() { |
@@ -350,8 +345,8 @@ discard block |
||
| 350 | 345 | * without any inheritance, merging or parent lookup if it doesn't exist on the given class. |
| 351 | 346 | * |
| 352 | 347 | * @static |
| 353 | - * @param $class - The class to get the static from |
|
| 354 | - * @param $name - The property to get from the class |
|
| 348 | + * @param string $class - The class to get the static from |
|
| 349 | + * @param string $name - The property to get from the class |
|
| 355 | 350 | * @param null $default - The value to return if property doesn't exist on class |
| 356 | 351 | * @return any - The value of the static property $name on class $class, or $default if that property is not |
| 357 | 352 | * defined |
@@ -877,6 +872,7 @@ discard block |
||
| 877 | 872 | |
| 878 | 873 | /** |
| 879 | 874 | * @see Object::get_static() |
| 875 | + * @param string $name |
|
| 880 | 876 | */ |
| 881 | 877 | public function stat($name, $uncached = false) { |
| 882 | 878 | return Config::inst()->get(($this->class ? $this->class : get_class($this)), $name, Config::FIRST_SET); |
@@ -884,6 +880,8 @@ discard block |
||
| 884 | 880 | |
| 885 | 881 | /** |
| 886 | 882 | * @see Object::set_static() |
| 883 | + * @param string $name |
|
| 884 | + * @param string $value |
|
| 887 | 885 | */ |
| 888 | 886 | public function set_stat($name, $value) { |
| 889 | 887 | Config::inst()->update(($this->class ? $this->class : get_class($this)), $name, $value); |
@@ -891,6 +889,7 @@ discard block |
||
| 891 | 889 | |
| 892 | 890 | /** |
| 893 | 891 | * @see Object::uninherited_static() |
| 892 | + * @param string $name |
|
| 894 | 893 | */ |
| 895 | 894 | public function uninherited($name) { |
| 896 | 895 | return Config::inst()->get(($this->class ? $this->class : get_class($this)), $name, Config::UNINHERITED); |
@@ -941,7 +940,7 @@ discard block |
||
| 941 | 940 | * all results into an array |
| 942 | 941 | * |
| 943 | 942 | * @param string $method the method name to call |
| 944 | - * @param mixed $argument a single argument to pass |
|
| 943 | + * @param string $argument a single argument to pass |
|
| 945 | 944 | * @return mixed |
| 946 | 945 | * @todo integrate inheritance rules |
| 947 | 946 | */ |
@@ -964,7 +963,7 @@ discard block |
||
| 964 | 963 | * The extension methods are defined during {@link __construct()} in {@link defineMethods()}. |
| 965 | 964 | * |
| 966 | 965 | * @param string $method the name of the method to call on each extension |
| 967 | - * @param mixed $a1,... up to 7 arguments to be passed to the method |
|
| 966 | + * @param DataObject $a4 |
|
| 968 | 967 | * @return array |
| 969 | 968 | */ |
| 970 | 969 | public function extend($method, &$a1=null, &$a2=null, &$a3=null, &$a4=null, &$a5=null, &$a6=null, &$a7=null) { |
@@ -192,7 +192,7 @@ |
||
| 192 | 192 | * |
| 193 | 193 | * @todo refactor this into GridFieldComponent |
| 194 | 194 | * |
| 195 | - * @param mixed $value |
|
| 195 | + * @param string $value |
|
| 196 | 196 | * @param string|array $castingDefinition |
| 197 | 197 | * |
| 198 | 198 | * @return mixed |
@@ -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. |
@@ -259,6 +260,9 @@ discard block |
||
| 259 | 260 | parent::__construct(); |
| 260 | 261 | } |
| 261 | 262 | |
| 263 | + /** |
|
| 264 | + * @return string |
|
| 265 | + */ |
|
| 262 | 266 | public function getOembedURL() { |
| 263 | 267 | return $this->url; |
| 264 | 268 | } |
@@ -343,6 +347,7 @@ discard block |
||
| 343 | 347 | |
| 344 | 348 | /** |
| 345 | 349 | * Wrap the check for looking into Oembed JSON within $this->data. |
| 350 | + * @param string $field |
|
| 346 | 351 | */ |
| 347 | 352 | public function hasField($field) { |
| 348 | 353 | $this->loadData(); |