@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | /** |
64 | 64 | * Assign a new configuration instance or identifier |
65 | 65 | * |
66 | - * @param string|HTMLEditorConfig $config |
|
66 | + * @param string $config |
|
67 | 67 | * @return $this |
68 | 68 | */ |
69 | 69 | public function setEditorConfig($config) { |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | * |
78 | 78 | * @param string $name The internal field name, passed to forms. |
79 | 79 | * @param string $title The human-readable field label. |
80 | - * @param mixed $value The value of the field. |
|
80 | + * @param integer $value The value of the field. |
|
81 | 81 | * @param string $config HTMLEditorConfig identifier to be used. Default to the active one. |
82 | 82 | */ |
83 | 83 | public function __construct($name, $title = null, $value = '', $config = null) { |
@@ -118,6 +118,9 @@ discard block |
||
118 | 118 | $record->{$this->name} = $htmlValue->getContent(); |
119 | 119 | } |
120 | 120 | |
121 | + /** |
|
122 | + * @param string|null $value |
|
123 | + */ |
|
121 | 124 | public function setValue($value) { |
122 | 125 | // Regenerate links prior to preview, so that the editor can see them. |
123 | 126 | $value = Image::regenerate_html_links($value); |
@@ -185,6 +188,10 @@ discard block |
||
185 | 188 | |
186 | 189 | protected $controller, $name; |
187 | 190 | |
191 | + /** |
|
192 | + * @param Controller|null $controller |
|
193 | + * @param string $name |
|
194 | + */ |
|
188 | 195 | public function __construct($controller, $name) { |
189 | 196 | parent::__construct(); |
190 | 197 | |
@@ -203,7 +210,7 @@ discard block |
||
203 | 210 | /** |
204 | 211 | * Searches the SiteTree for display in the dropdown |
205 | 212 | * |
206 | - * @return callback |
|
213 | + * @return SilverStripe\ORM\DataList |
|
207 | 214 | */ |
208 | 215 | public function siteTreeSearchCallback($sourceObject, $labelField, $search) { |
209 | 216 | return DataObject::get($sourceObject)->filterAny(array( |
@@ -583,7 +590,7 @@ discard block |
||
583 | 590 | /** |
584 | 591 | * Find all anchors available on the given page. |
585 | 592 | * |
586 | - * @return array |
|
593 | + * @return string |
|
587 | 594 | * @throws SS_HTTPResponse_Exception |
588 | 595 | */ |
589 | 596 | public function getanchors() { |
@@ -646,7 +653,7 @@ discard block |
||
646 | 653 | * Gets files filtered by a given parent with the allowed extensions |
647 | 654 | * |
648 | 655 | * @param int $parentID |
649 | - * @return DataList |
|
656 | + * @return SilverStripe\ORM\DataList |
|
650 | 657 | */ |
651 | 658 | protected function getFiles($parentID = null) { |
652 | 659 | $exts = $this->getAllowedExtensions(); |
@@ -1159,7 +1166,7 @@ discard block |
||
1159 | 1166 | } |
1160 | 1167 | |
1161 | 1168 | /** |
1162 | - * @return AdapterInterface |
|
1169 | + * @return Embed |
|
1163 | 1170 | */ |
1164 | 1171 | public function getEmbed() { |
1165 | 1172 | return $this->embed; |
@@ -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]); |
@@ -646,7 +646,7 @@ discard block |
||
646 | 646 | * @param boolean $create Flag indicating whether the database should be created |
647 | 647 | * if it doesn't exist. If $create is false and the database doesn't exist |
648 | 648 | * then an error will be raised |
649 | - * @param int|boolean $errorLevel The level of error reporting to enable for the query, or false if no error |
|
649 | + * @param boolean $errorLevel The level of error reporting to enable for the query, or false if no error |
|
650 | 650 | * should be raised |
651 | 651 | * @return boolean Flag indicating success |
652 | 652 | */ |
@@ -681,7 +681,7 @@ discard block |
||
681 | 681 | /** |
682 | 682 | * Returns the name of the currently selected database |
683 | 683 | * |
684 | - * @return string|null Name of the selected database, or null if none selected |
|
684 | + * @return string Name of the selected database, or null if none selected |
|
685 | 685 | */ |
686 | 686 | public function getSelectedDatabase() { |
687 | 687 | return $this->connector->getSelectedDatabase(); |
@@ -806,6 +806,7 @@ discard block |
||
806 | 806 | |
807 | 807 | /** |
808 | 808 | * @deprecated since version 4.0 Use DB::field_list instead |
809 | + * @param string $table |
|
809 | 810 | */ |
810 | 811 | public function fieldList($table) { |
811 | 812 | Deprecation::notice('4.0', 'Use DB::field_list instead'); |
@@ -115,6 +115,9 @@ |
||
115 | 115 | $this->query("ALTER TABLE \"$tableName\" $alterations"); |
116 | 116 | } |
117 | 117 | |
118 | + /** |
|
119 | + * @param string $tableName |
|
120 | + */ |
|
118 | 121 | public function isView($tableName) { |
119 | 122 | $info = $this->query("SHOW /*!50002 FULL*/ TABLES LIKE '$tableName'")->record(); |
120 | 123 | return $info && strtoupper($info['Table_type']) == 'VIEW'; |
@@ -78,8 +78,8 @@ |
||
78 | 78 | |
79 | 79 | /** |
80 | 80 | * Hook the result-set given into a Query class, suitable for use by SilverStripe. |
81 | - * @param mysqli_stmt $statement The related statement, if present |
|
82 | - * @param mysqli_result $metadata The metadata for this statement |
|
81 | + * @param \mysqli_stmt $statement The related statement, if present |
|
82 | + * @param \mysqli_result $metadata The metadata for this statement |
|
83 | 83 | */ |
84 | 84 | public function __construct($statement, $metadata) { |
85 | 85 | $this->statement = $statement; |
@@ -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 |
@@ -107,7 +107,7 @@ discard block |
||
107 | 107 | /** |
108 | 108 | * Gets the url to return to after build |
109 | 109 | * |
110 | - * @return string|null |
|
110 | + * @return string |
|
111 | 111 | */ |
112 | 112 | protected function getReturnURL() { |
113 | 113 | $url = $this->request->getVar('returnURL'); |
@@ -152,7 +152,7 @@ discard block |
||
152 | 152 | /** |
153 | 153 | * Returns the timestamp of the time that the database was last built |
154 | 154 | * |
155 | - * @return string Returns the timestamp of the time that the database was |
|
155 | + * @return integer|null Returns the timestamp of the time that the database was |
|
156 | 156 | * last built |
157 | 157 | */ |
158 | 158 | public static function lastBuilt() { |
@@ -7,6 +7,9 @@ discard block |
||
7 | 7 | |
8 | 8 | protected static $fixture_file = 'MemberDatetimeOptionsetFieldTest.yml'; |
9 | 9 | |
10 | + /** |
|
11 | + * @param DataObject|null $member |
|
12 | + */ |
|
10 | 13 | protected function createDateFormatFieldForMember($member) { |
11 | 14 | require_once 'Zend/Date.php'; |
12 | 15 | $defaultDateFormat = Zend_Locale_Format::getDateFormat($member->Locale); |
@@ -26,6 +29,9 @@ discard block |
||
26 | 29 | return $field; |
27 | 30 | } |
28 | 31 | |
32 | + /** |
|
33 | + * @param DataObject|null $member |
|
34 | + */ |
|
29 | 35 | protected function createTimeFormatFieldForMember($member) { |
30 | 36 | require_once 'Zend/Date.php'; |
31 | 37 | $defaultTimeFormat = Zend_Locale_Format::getTimeFormat($member->Locale); |
@@ -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) { |