@@ -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); |
@@ -146,7 +146,7 @@ |
||
146 | 146 | * Add a number of items to the relation. |
147 | 147 | * |
148 | 148 | * @param array $items Items to add, as either DataObjects or IDs. |
149 | - * @return DataList |
|
149 | + * @return UnsavedRelationList |
|
150 | 150 | */ |
151 | 151 | public function addMany($items) { |
152 | 152 | foreach($items as $item) { |
@@ -138,7 +138,7 @@ |
||
138 | 138 | * Get the current value of an option |
139 | 139 | * |
140 | 140 | * @param string $key The key of the option to get |
141 | - * @return mixed The value of the specified option |
|
141 | + * @return string The value of the specified option |
|
142 | 142 | */ |
143 | 143 | abstract public function getOption($key); |
144 | 144 |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | /** |
40 | 40 | * Given a TinyMCE pattern (close to unix glob style), create a regex that does the match |
41 | 41 | * |
42 | - * @param $str - The TinyMCE pattern |
|
42 | + * @param string|null $str - The TinyMCE pattern |
|
43 | 43 | * @return string - The equivalent regex |
44 | 44 | */ |
45 | 45 | protected function patternToRegex($str) { |
@@ -180,6 +180,7 @@ discard block |
||
180 | 180 | /** |
181 | 181 | * Given an attribute name, return the rule structure for that attribute |
182 | 182 | * @param string $name - The attribute name |
183 | + * @param stdClass $elementRule |
|
183 | 184 | * @return stdClass - The attribute rule |
184 | 185 | */ |
185 | 186 | protected function getRuleForAttribute($elementRule, $name) { |
@@ -111,6 +111,8 @@ discard block |
||
111 | 111 | |
112 | 112 | /** |
113 | 113 | * Override the function that constructs the result arrays to also prepare a 'php' item in the array |
114 | + * @param string $matchrule |
|
115 | + * @param string $name |
|
114 | 116 | */ |
115 | 117 | function construct($matchrule, $name, $arguments = null) { |
116 | 118 | $res = parent::construct($matchrule, $name, $arguments); |
@@ -172,9 +174,9 @@ discard block |
||
172 | 174 | |
173 | 175 | /** |
174 | 176 | * Ensures that the arguments to addOpenBlock and addClosedBlock are valid |
175 | - * @param $name |
|
176 | - * @param $callable |
|
177 | - * @param $type |
|
177 | + * @param string $name |
|
178 | + * @param callable $callable |
|
179 | + * @param string $type |
|
178 | 180 | * @throws InvalidArgumentException |
179 | 181 | */ |
180 | 182 | protected function validateExtensionBlock($name, $callable, $type) { |
@@ -737,6 +739,7 @@ discard block |
||
737 | 739 | * The basic generated PHP of LookupStep and LastLookupStep is the same, except that LookupStep calls 'obj' to |
738 | 740 | * get the next ViewableData in the sequence, and LastLookupStep calls different methods (XML_val, hasValue, obj) |
739 | 741 | * depending on the context the lookup is used in. |
742 | + * @param string $method |
|
740 | 743 | */ |
741 | 744 | function Lookup_AddLookupStep(&$res, $sub, $method) { |
742 | 745 | $res['LookupSteps'][] = $sub; |
@@ -4691,8 +4694,8 @@ discard block |
||
4691 | 4694 | * Compiles some passed template source code into the php code that will execute as per the template source. |
4692 | 4695 | * |
4693 | 4696 | * @throws SSTemplateParseException |
4694 | - * @param $string The source of the template |
|
4695 | - * @param string $templateName The name of the template, normally the filename the template source was loaded from |
|
4697 | + * @param string $string The source of the template |
|
4698 | + * @param string string The name of the template, normally the filename the template source was loaded from |
|
4696 | 4699 | * @param bool $includeDebuggingComments True is debugging comments should be included in the output |
4697 | 4700 | * @param bool $topTemplate True if this is a top template, false if it's just a template |
4698 | 4701 | * @return mixed|string The php that, when executed (via include or exec) will behave as per the template source |
@@ -4732,6 +4735,7 @@ discard block |
||
4732 | 4735 | |
4733 | 4736 | /** |
4734 | 4737 | * @param string $code |
4738 | + * @param string $templateName |
|
4735 | 4739 | * @return string $code |
4736 | 4740 | */ |
4737 | 4741 | protected function includeDebuggingComments($code, $templateName) { |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | /** |
61 | 61 | * Assign a new configuration instance or identifier |
62 | 62 | * |
63 | - * @param string|HTMLEditorConfig $config |
|
63 | + * @param string $config |
|
64 | 64 | * @return $this |
65 | 65 | */ |
66 | 66 | public function setEditorConfig($config) { |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | * |
75 | 75 | * @param string $name The internal field name, passed to forms. |
76 | 76 | * @param string $title The human-readable field label. |
77 | - * @param mixed $value The value of the field. |
|
77 | + * @param integer $value The value of the field. |
|
78 | 78 | * @param string $config HTMLEditorConfig identifier to be used. Default to the active one. |
79 | 79 | */ |
80 | 80 | public function __construct($name, $title = null, $value = '', $config = null) { |
@@ -115,6 +115,9 @@ discard block |
||
115 | 115 | $record->{$this->name} = $htmlValue->getContent(); |
116 | 116 | } |
117 | 117 | |
118 | + /** |
|
119 | + * @param string|null $value |
|
120 | + */ |
|
118 | 121 | public function setValue($value) { |
119 | 122 | // Regenerate links prior to preview, so that the editor can see them. |
120 | 123 | $value = Image::regenerate_html_links($value); |
@@ -182,6 +185,10 @@ discard block |
||
182 | 185 | |
183 | 186 | protected $controller, $name; |
184 | 187 | |
188 | + /** |
|
189 | + * @param Controller|null $controller |
|
190 | + * @param string $name |
|
191 | + */ |
|
185 | 192 | public function __construct($controller, $name) { |
186 | 193 | parent::__construct(); |
187 | 194 | |
@@ -200,7 +207,7 @@ discard block |
||
200 | 207 | /** |
201 | 208 | * Searches the SiteTree for display in the dropdown |
202 | 209 | * |
203 | - * @return callback |
|
210 | + * @return DataList |
|
204 | 211 | */ |
205 | 212 | public function siteTreeSearchCallback($sourceObject, $labelField, $search) { |
206 | 213 | return DataObject::get($sourceObject)->filterAny(array( |
@@ -580,7 +587,7 @@ discard block |
||
580 | 587 | /** |
581 | 588 | * Find all anchors available on the given page. |
582 | 589 | * |
583 | - * @return array |
|
590 | + * @return string |
|
584 | 591 | * @throws SS_HTTPResponse_Exception |
585 | 592 | */ |
586 | 593 | public function getanchors() { |
@@ -1156,7 +1163,7 @@ discard block |
||
1156 | 1163 | } |
1157 | 1164 | |
1158 | 1165 | /** |
1159 | - * @return AdapterInterface |
|
1166 | + * @return Embed |
|
1160 | 1167 | */ |
1161 | 1168 | public function getEmbed() { |
1162 | 1169 | return $this->embed; |
@@ -100,7 +100,7 @@ discard block |
||
100 | 100 | /** |
101 | 101 | * Get value of display_errors ini value |
102 | 102 | * |
103 | - * @return mixed |
|
103 | + * @return string |
|
104 | 104 | */ |
105 | 105 | protected function getDisplayErrors() { |
106 | 106 | return ini_get('display_errors'); |
@@ -110,7 +110,7 @@ discard block |
||
110 | 110 | * Add this callback to the chain of callbacks to call along with the state |
111 | 111 | * that $error must be in this point in the chain for the callback to be called |
112 | 112 | * |
113 | - * @param $callback - The callback to call |
|
113 | + * @param callable $callback - The callback to call |
|
114 | 114 | * @param $onErrorState - false if only call if no errors yet, true if only call if already errors, null for either |
115 | 115 | * @return $this |
116 | 116 | */ |
@@ -379,7 +379,7 @@ discard block |
||
379 | 379 | /** |
380 | 380 | * Return the IDs of all the marked nodes. |
381 | 381 | * |
382 | - * @return array |
|
382 | + * @return integer[] |
|
383 | 383 | */ |
384 | 384 | public function markedNodeIDs() { |
385 | 385 | return array_keys($this->markedNodes); |
@@ -756,7 +756,7 @@ discard block |
||
756 | 756 | * Get the next node in the tree of the type. If there is no instance of the className descended from this node, |
757 | 757 | * then search the parents. |
758 | 758 | * @param string $className Class name of the node to find. |
759 | - * @param string|int $root ID/ClassName of the node to limit the search to |
|
759 | + * @param integer $root ID/ClassName of the node to limit the search to |
|
760 | 760 | * @param DataObject $afterNode Used for recursive calls to this function |
761 | 761 | * @return DataObject |
762 | 762 | */ |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | /** |
25 | 25 | * Modify method visibility to public for testing |
26 | 26 | * |
27 | - * @param mixed $errors |
|
27 | + * @param string $errors |
|
28 | 28 | */ |
29 | 29 | public function setDisplayErrors($errors) |
30 | 30 | { |
@@ -33,6 +33,10 @@ discard block |
||
33 | 33 | } |
34 | 34 | |
35 | 35 | // Change function visibility to be testable directly |
36 | + |
|
37 | + /** |
|
38 | + * @param string $memstring |
|
39 | + */ |
|
36 | 40 | public function translateMemstring($memstring) { |
37 | 41 | return parent::translateMemstring($memstring); |
38 | 42 | } |