@@ -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 | } |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | /** |
42 | 42 | * Given a TinyMCE pattern (close to unix glob style), create a regex that does the match |
43 | 43 | * |
44 | - * @param $str - The TinyMCE pattern |
|
44 | + * @param string|null $str - The TinyMCE pattern |
|
45 | 45 | * @return string - The equivalent regex |
46 | 46 | */ |
47 | 47 | protected function patternToRegex($str) { |
@@ -182,6 +182,7 @@ discard block |
||
182 | 182 | /** |
183 | 183 | * Given an attribute name, return the rule structure for that attribute |
184 | 184 | * @param string $name - The attribute name |
185 | + * @param stdClass $elementRule |
|
185 | 186 | * @return stdClass - The attribute rule |
186 | 187 | */ |
187 | 188 | protected function getRuleForAttribute($elementRule, $name) { |
@@ -245,7 +246,7 @@ discard block |
||
245 | 246 | * Given an SS_HTMLValue instance, will remove and elements and attributes that are |
246 | 247 | * not explicitly included in the whitelist passed to __construct on instance creation |
247 | 248 | * |
248 | - * @param SS_HTMLValue $html - The HTMLValue to remove any non-whitelisted elements & attributes from |
|
249 | + * @param HTMLValue $html - The HTMLValue to remove any non-whitelisted elements & attributes from |
|
249 | 250 | */ |
250 | 251 | public function sanitise (HTMLValue $html) { |
251 | 252 | if(!$this->elements && !$this->elementPatterns) return; |
@@ -46,7 +46,6 @@ discard block |
||
46 | 46 | /** |
47 | 47 | * Injector injection point for database controller |
48 | 48 | * |
49 | - * @param SS_Database $connector |
|
50 | 49 | */ |
51 | 50 | public function setDatabase(SS_Database $database) { |
52 | 51 | $this->database = $database; |
@@ -483,7 +482,7 @@ discard block |
||
483 | 482 | /** |
484 | 483 | * Given an index spec determines the index type |
485 | 484 | * |
486 | - * @param array|string $spec |
|
485 | + * @param string $spec |
|
487 | 486 | * @return string |
488 | 487 | */ |
489 | 488 | protected function determineIndexType($spec) { |
@@ -551,7 +550,7 @@ discard block |
||
551 | 550 | /** |
552 | 551 | * Returns true if the given table is exists in the current database |
553 | 552 | * |
554 | - * @param string $table Name of table to check |
|
553 | + * @param string $tableName Name of table to check |
|
555 | 554 | * @return boolean Flag indicating existence of table |
556 | 555 | */ |
557 | 556 | abstract public function hasTable($tableName); |
@@ -324,7 +324,7 @@ |
||
324 | 324 | * @param int $errorLevel |
325 | 325 | * @param string $sql |
326 | 326 | * @param array $parameters |
327 | - * @return \PDOQuery |
|
327 | + * @return PDOQuery|null |
|
328 | 328 | */ |
329 | 329 | protected function prepareResults($statement, $errorLevel, $sql, $parameters = array()) { |
330 | 330 |
@@ -79,9 +79,15 @@ |
||
79 | 79 | public function can($member) { |
80 | 80 | } |
81 | 81 | |
82 | + /** |
|
83 | + * @param \Member $member |
|
84 | + */ |
|
82 | 85 | public function canEdit($member) { |
83 | 86 | } |
84 | 87 | |
88 | + /** |
|
89 | + * @param \Member $member |
|
90 | + */ |
|
85 | 91 | public function canDelete($member) { |
86 | 92 | } |
87 | 93 |
@@ -172,7 +172,7 @@ discard block |
||
172 | 172 | * Returns a new DataList instance with the specified query parameter assigned |
173 | 173 | * |
174 | 174 | * @param string|array $keyOrArray Either the single key to set, or an array of key value pairs to set |
175 | - * @param mixed $val If $keyOrArray is not an array, this is the value to set |
|
175 | + * @param string $val If $keyOrArray is not an array, this is the value to set |
|
176 | 176 | * @return static |
177 | 177 | */ |
178 | 178 | public function setDataQueryParam($keyOrArray, $val = null) { |
@@ -535,7 +535,7 @@ discard block |
||
535 | 535 | * Check if the given field specification could be interpreted as an unquoted relation name |
536 | 536 | * |
537 | 537 | * @param string $field |
538 | - * @return bool |
|
538 | + * @return integer |
|
539 | 539 | */ |
540 | 540 | protected function isValidRelationName($field) { |
541 | 541 | return preg_match('/^[A-Z0-9._]+$/i', $field); |
@@ -650,7 +650,7 @@ discard block |
||
650 | 650 | * @param int $order A numerical index to control the order that joins are added to the query; lower order values |
651 | 651 | * will cause the query to appear first. The default is 20, and joins created automatically by the |
652 | 652 | * ORM have a value of 10. |
653 | - * @param array $parameters Any additional parameters if the join is a parameterised subquery |
|
653 | + * @param string[] $parameters Any additional parameters if the join is a parameterised subquery |
|
654 | 654 | * @return DataList |
655 | 655 | */ |
656 | 656 | public function innerJoin($table, $onClause, $alias = null, $order = 20, $parameters = array()) { |
@@ -668,7 +668,7 @@ discard block |
||
668 | 668 | * @param int $order A numerical index to control the order that joins are added to the query; lower order values |
669 | 669 | * will cause the query to appear first. The default is 20, and joins created automatically by the |
670 | 670 | * ORM have a value of 10. |
671 | - * @param array $parameters Any additional parameters if the join is a parameterised subquery |
|
671 | + * @param string[] $parameters Any additional parameters if the join is a parameterised subquery |
|
672 | 672 | * @return DataList |
673 | 673 | */ |
674 | 674 | public function leftJoin($table, $onClause, $alias = null, $order = 20, $parameters = array()) { |
@@ -884,7 +884,7 @@ discard block |
||
884 | 884 | /** |
885 | 885 | * Restrict the columns to fetch into this DataList |
886 | 886 | * |
887 | - * @param array $queriedColumns |
|
887 | + * @param string[] $queriedColumns |
|
888 | 888 | * @return DataList |
889 | 889 | */ |
890 | 890 | public function setQueriedColumns($queriedColumns) { |
@@ -1159,7 +1159,7 @@ discard block |
||
1159 | 1159 | /** |
1160 | 1160 | * Returns item stored in list with index $key |
1161 | 1161 | * |
1162 | - * @param mixed $key |
|
1162 | + * @param integer $key |
|
1163 | 1163 | * @return DataObject |
1164 | 1164 | */ |
1165 | 1165 | public function offsetGet($key) { |
@@ -588,8 +588,8 @@ discard block |
||
588 | 588 | |
589 | 589 | /** |
590 | 590 | * Helper function to duplicate relations from one object to another |
591 | - * @param $sourceObject the source object to duplicate from |
|
592 | - * @param $destinationObject the destination object to populate with the duplicated relations |
|
591 | + * @param DataObject $sourceObject the source object to duplicate from |
|
592 | + * @param DataObject $destinationObject the destination object to populate with the duplicated relations |
|
593 | 593 | * @param $name the name of the relation to duplicate (e.g. members) |
594 | 594 | */ |
595 | 595 | private function duplicateRelations($sourceObject, $destinationObject, $name) { |
@@ -987,6 +987,7 @@ discard block |
||
987 | 987 | * @param $includeRelations Boolean Merge any existing relations (optional) |
988 | 988 | * @param $overwriteWithEmpty Boolean Overwrite existing left values with empty right values. |
989 | 989 | * Only applicable with $priority='right'. (optional) |
990 | + * @param DataObject|null $rightObj |
|
990 | 991 | * @return Boolean |
991 | 992 | */ |
992 | 993 | public function merge($rightObj, $priority = 'right', $includeRelations = true, $overwriteWithEmpty = false) { |
@@ -2272,6 +2273,7 @@ discard block |
||
2272 | 2273 | * |
2273 | 2274 | * This is experimental, and is currently only a Postgres-specific enhancement. |
2274 | 2275 | * |
2276 | + * @param string $class |
|
2275 | 2277 | * @return array or false |
2276 | 2278 | */ |
2277 | 2279 | public function database_extensions($class){ |
@@ -3081,7 +3083,7 @@ discard block |
||
3081 | 3083 | * Traverses to a field referenced by relationships between data objects, returning the value |
3082 | 3084 | * The path to the related field is specified with dot separated syntax (eg: Parent.Child.Child.FieldName) |
3083 | 3085 | * |
3084 | - * @param $fieldName string |
|
3086 | + * @param string $fieldName string |
|
3085 | 3087 | * @return string | null - will return null on a missing value |
3086 | 3088 | */ |
3087 | 3089 | public function relField($fieldName) { |
@@ -3360,6 +3362,7 @@ discard block |
||
3360 | 3362 | /** |
3361 | 3363 | * @see $sourceQueryParams |
3362 | 3364 | * @param array |
3365 | + * @param string $key |
|
3363 | 3366 | */ |
3364 | 3367 | public function setSourceQueryParam($key, $value) { |
3365 | 3368 | $this->sourceQueryParams[$key] = $value; |
@@ -3367,6 +3370,7 @@ discard block |
||
3367 | 3370 | |
3368 | 3371 | /** |
3369 | 3372 | * @see $sourceQueryParams |
3373 | + * @param string $key |
|
3370 | 3374 | * @return Mixed |
3371 | 3375 | */ |
3372 | 3376 | public function getSourceQueryParam($key) { |