@@ -144,7 +144,6 @@ discard block |
||
144 | 144 | * |
145 | 145 | * @param string $name The internal field name, passed to forms. |
146 | 146 | * @param string $title The field label. |
147 | - * @param Form $form Reference to the container form |
|
148 | 147 | */ |
149 | 148 | public function __construct($name, $title = null) { |
150 | 149 | $this->addExtraClass('ss-upload'); // class, used by js |
@@ -256,6 +255,10 @@ discard block |
||
256 | 255 | return $this->record; |
257 | 256 | } |
258 | 257 | |
258 | + /** |
|
259 | + * @param null|DataObject $value |
|
260 | + * @param DataObject $record |
|
261 | + */ |
|
259 | 262 | public function setValue($value, $record = null) { |
260 | 263 | // Extract value from underlying record |
261 | 264 | if(empty($value) && $this->getName() && $record instanceof DataObject) { |
@@ -50,6 +50,7 @@ discard block |
||
50 | 50 | * |
51 | 51 | * By default, this is set to true so that it's clearer what's happening, but the predefined |
52 | 52 | * {@link GridFieldConfig} subclasses set this to false for flexibility. |
53 | + * @param boolean $throwExceptionOnBadDataType |
|
53 | 54 | */ |
54 | 55 | public function setThrowExceptionOnBadDataType($throwExceptionOnBadDataType) { |
55 | 56 | $this->throwExceptionOnBadDataType = $throwExceptionOnBadDataType; |
@@ -65,6 +66,7 @@ discard block |
||
65 | 66 | /** |
66 | 67 | * Check that this dataList is of the right data type. |
67 | 68 | * Returns false if it's a bad data type, and if appropriate, throws an exception. |
69 | + * @param SS_List $dataList |
|
68 | 70 | */ |
69 | 71 | protected function checkDataType($dataList) { |
70 | 72 | if($dataList instanceof SS_Limitable) { |
@@ -387,7 +387,7 @@ discard block |
||
387 | 387 | * |
388 | 388 | * Note that columns may be double quoted as per ANSI sql standard |
389 | 389 | * |
390 | - * @return DataList |
|
390 | + * @return ArrayList |
|
391 | 391 | * @see SS_List::sort() |
392 | 392 | * @example $list->sort('Name'); // default ASC sorting |
393 | 393 | * @example $list->sort('Name DESC'); // DESC sorting |
@@ -523,6 +523,9 @@ discard block |
||
523 | 523 | return $list; |
524 | 524 | } |
525 | 525 | |
526 | + /** |
|
527 | + * @param integer $id |
|
528 | + */ |
|
526 | 529 | public function byID($id) { |
527 | 530 | $firstElement = $this->filter("ID", $id)->first(); |
528 | 531 | |
@@ -624,7 +627,6 @@ discard block |
||
624 | 627 | /** |
625 | 628 | * Returns whether an item with $key exists |
626 | 629 | * |
627 | - * @param mixed $key |
|
628 | 630 | * @return bool |
629 | 631 | */ |
630 | 632 | public function offsetExists($offset) { |
@@ -634,7 +636,6 @@ discard block |
||
634 | 636 | /** |
635 | 637 | * Returns item stored in list with index $key |
636 | 638 | * |
637 | - * @param mixed $key |
|
638 | 639 | * @return DataObject |
639 | 640 | */ |
640 | 641 | public function offsetGet($offset) { |
@@ -644,7 +645,6 @@ discard block |
||
644 | 645 | /** |
645 | 646 | * Set an item with the key in $key |
646 | 647 | * |
647 | - * @param mixed $key |
|
648 | 648 | * @param mixed $value |
649 | 649 | */ |
650 | 650 | public function offsetSet($offset, $value) { |
@@ -658,7 +658,6 @@ discard block |
||
658 | 658 | /** |
659 | 659 | * Unset an item with the key in $key |
660 | 660 | * |
661 | - * @param mixed $key |
|
662 | 661 | */ |
663 | 662 | public function offsetUnset($offset) { |
664 | 663 | unset($this->items[$offset]); |
@@ -50,6 +50,7 @@ |
||
50 | 50 | * |
51 | 51 | * @param DataObject (Optional) |
52 | 52 | * @param DataObject |
53 | + * @param DataObject|null $fromRecord |
|
53 | 54 | */ |
54 | 55 | public function __construct($fromRecord, DataObject $toRecord) { |
55 | 56 | if(!$toRecord) user_error("DataDifferencer constructed without a toRecord", E_USER_WARNING); |
@@ -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) { |
@@ -520,7 +520,7 @@ discard block |
||
520 | 520 | * Check if the given field specification could be interpreted as an unquoted relation name |
521 | 521 | * |
522 | 522 | * @param string $field |
523 | - * @return bool |
|
523 | + * @return integer |
|
524 | 524 | */ |
525 | 525 | protected function isValidRelationName($field) { |
526 | 526 | return preg_match('/^[A-Z0-9._]+$/i', $field); |
@@ -635,7 +635,7 @@ discard block |
||
635 | 635 | * @param int $order A numerical index to control the order that joins are added to the query; lower order values |
636 | 636 | * will cause the query to appear first. The default is 20, and joins created automatically by the |
637 | 637 | * ORM have a value of 10. |
638 | - * @param array $parameters Any additional parameters if the join is a parameterised subquery |
|
638 | + * @param string[] $parameters Any additional parameters if the join is a parameterised subquery |
|
639 | 639 | * @return DataList |
640 | 640 | */ |
641 | 641 | public function innerJoin($table, $onClause, $alias = null, $order = 20, $parameters = array()) { |
@@ -653,7 +653,7 @@ discard block |
||
653 | 653 | * @param int $order A numerical index to control the order that joins are added to the query; lower order values |
654 | 654 | * will cause the query to appear first. The default is 20, and joins created automatically by the |
655 | 655 | * ORM have a value of 10. |
656 | - * @param array $parameters Any additional parameters if the join is a parameterised subquery |
|
656 | + * @param string[] $parameters Any additional parameters if the join is a parameterised subquery |
|
657 | 657 | * @return DataList |
658 | 658 | */ |
659 | 659 | public function leftJoin($table, $onClause, $alias = null, $order = 20, $parameters = array()) { |
@@ -780,7 +780,7 @@ discard block |
||
780 | 780 | * Return the maximum value of the given field in this DataList |
781 | 781 | * |
782 | 782 | * @param string $fieldName |
783 | - * @return mixed |
|
783 | + * @return string |
|
784 | 784 | */ |
785 | 785 | public function max($fieldName) { |
786 | 786 | return $this->dataQuery->max($fieldName); |
@@ -790,7 +790,7 @@ discard block |
||
790 | 790 | * Return the minimum value of the given field in this DataList |
791 | 791 | * |
792 | 792 | * @param string $fieldName |
793 | - * @return mixed |
|
793 | + * @return string |
|
794 | 794 | */ |
795 | 795 | public function min($fieldName) { |
796 | 796 | return $this->dataQuery->min($fieldName); |
@@ -800,7 +800,7 @@ discard block |
||
800 | 800 | * Return the average value of the given field in this DataList |
801 | 801 | * |
802 | 802 | * @param string $fieldName |
803 | - * @return mixed |
|
803 | + * @return string |
|
804 | 804 | */ |
805 | 805 | public function avg($fieldName) { |
806 | 806 | return $this->dataQuery->avg($fieldName); |
@@ -810,7 +810,7 @@ discard block |
||
810 | 810 | * Return the sum of the values of the given field in this DataList |
811 | 811 | * |
812 | 812 | * @param string $fieldName |
813 | - * @return mixed |
|
813 | + * @return string |
|
814 | 814 | */ |
815 | 815 | public function sum($fieldName) { |
816 | 816 | return $this->dataQuery->sum($fieldName); |
@@ -862,7 +862,7 @@ discard block |
||
862 | 862 | /** |
863 | 863 | * Restrict the columns to fetch into this DataList |
864 | 864 | * |
865 | - * @param array $queriedColumns |
|
865 | + * @param string[] $queriedColumns |
|
866 | 866 | * @return DataList |
867 | 867 | */ |
868 | 868 | public function setQueriedColumns($queriedColumns) { |
@@ -1135,7 +1135,7 @@ discard block |
||
1135 | 1135 | /** |
1136 | 1136 | * Returns item stored in list with index $key |
1137 | 1137 | * |
1138 | - * @param mixed $key |
|
1138 | + * @param integer $key |
|
1139 | 1139 | * @return DataObject |
1140 | 1140 | */ |
1141 | 1141 | public function offsetGet($key) { |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | * Handles SQL escaping for both numeric and string values |
35 | 35 | * |
36 | 36 | * @param DataQuery $query |
37 | - * @return $this|DataQuery |
|
37 | + * @return DataQuery |
|
38 | 38 | */ |
39 | 39 | protected function applyOne(DataQuery $query) { |
40 | 40 | $this->model = $query->applyRelation($this->relation); |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | * Handles SQL escaping for both numeric and string values |
51 | 51 | * |
52 | 52 | * @param DataQuery $query |
53 | - * @return $this|DataQuery |
|
53 | + * @return DataQuery |
|
54 | 54 | */ |
55 | 55 | protected function excludeOne(DataQuery $query) { |
56 | 56 | $this->model = $query->applyRelation($this->relation); |
@@ -32,6 +32,7 @@ |
||
32 | 32 | /** |
33 | 33 | * Log a password change from the given member. |
34 | 34 | * Call MemberPassword::log($this) from within Member whenever the password is changed. |
35 | + * @param Member $member |
|
35 | 36 | */ |
36 | 37 | public static function log($member) { |
37 | 38 | $record = new MemberPassword(); |
@@ -21,6 +21,9 @@ |
||
21 | 21 | return str_replace(' ', $nbsp, trim($input)); |
22 | 22 | } |
23 | 23 | |
24 | + /** |
|
25 | + * @param string $locale |
|
26 | + */ |
|
24 | 27 | protected function checkInputValidation($locale, $tests) { |
25 | 28 | i18n::set_locale($locale); |
26 | 29 | $field = new NumericField('Number'); |
@@ -512,7 +512,7 @@ |
||
512 | 512 | * Get the HTML class attribute from a node in the sitetree |
513 | 513 | * |
514 | 514 | * @param $html |
515 | - * @param $node |
|
515 | + * @param DataObject|null $node |
|
516 | 516 | * @return string |
517 | 517 | */ |
518 | 518 | protected function getNodeClassFromTree($html, $node) { |