Completed
Pull Request — master (#5771)
by Florian
12:04
created
forms/htmleditor/HTMLEditorConfig.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -138,7 +138,7 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
forms/HTMLEditorSanitiser.php 1 patch
Doc Comments   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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) {
Please login to merge, or discard this patch.
view/SSTemplateParser.php.inc 1 patch
Doc Comments   +9 added lines, -5 removed lines patch added patch discarded remove patch
@@ -111,6 +111,8 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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) {
Please login to merge, or discard this patch.
core/startup/ErrorControlChain.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 	 */
Please login to merge, or discard this patch.
tests/core/startup/ErrorControlChainTest.php 1 patch
Doc Comments   +5 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 	}
Please login to merge, or discard this patch.
api/RSSFeed.php 1 patch
Doc Comments   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -191,7 +191,7 @@  discard block
 block discarded – undo
191 191
 	 *
192 192
 	 * TODO: Pass $response object to ->outputToBrowser() to loosen dependence on global state for easier testing/prototyping so dev can inject custom SS_HTTPResponse instance.
193 193
 	 *
194
-	 * @return	HTMLText
194
+	 * @return	DBField
195 195
 	 */
196 196
 	public function outputToBrowser() {
197 197
 		$prevState = Config::inst()->get('SSViewer', 'source_file_comments');
@@ -222,6 +222,7 @@  discard block
 block discarded – undo
222 222
 	 * via the standard template inclusion process.
223 223
 	 *
224 224
 	 * @param string
225
+	 * @param string $template
225 226
 	 */
226 227
 	public function setTemplate($template) {
227 228
 		$this->template = $template;
@@ -318,6 +319,7 @@  discard block
 block discarded – undo
318 319
 	/**
319 320
 	 * Return the named field as an obj() call from $this->failover.
320 321
 	 * Default to the given class if there's no casting information.
322
+	 * @param string $fieldName
321 323
 	 */
322 324
 	public function rssField($fieldName, $defaultClass = 'Varchar') {
323 325
 		if($fieldName) {
Please login to merge, or discard this patch.
forms/htmleditor/EmbedShortcodeProvider.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@
 block discarded – undo
22 22
 	/**
23 23
 	 * Gets the list of shortcodes provided by this handler
24 24
 	 *
25
-	 * @return mixed
25
+	 * @return string[]
26 26
 	 */
27 27
 	public static function get_shortcodes()
28 28
 	{
Please login to merge, or discard this patch.
control/Controller.php 1 patch
Doc Comments   +4 added lines, -3 removed lines patch added patch discarded remove patch
@@ -132,6 +132,7 @@  discard block
 block discarded – undo
132 132
 	 * {@inheritdoc}
133 133
 	 *
134 134
 	 * Also set the URLParams
135
+	 * @param SS_HTTPRequest $request
135 136
 	 */
136 137
 	public function setRequest($request) {
137 138
 		$return = parent::setRequest($request);
@@ -372,7 +373,7 @@  discard block
 block discarded – undo
372 373
 	 *
373 374
 	 * @param string $action
374 375
 	 *
375
-	 * @return HTMLText
376
+	 * @return DBField
376 377
 	 */
377 378
 	public function defaultAction($action) {
378 379
 		return $this->getViewer($action)->process($this);
@@ -508,7 +509,7 @@  discard block
 block discarded – undo
508 509
 	 *
509 510
 	 * @param array $params
510 511
 	 *
511
-	 * @return string
512
+	 * @return DBField
512 513
 	 */
513 514
 	public function render($params = null) {
514 515
 		$template = $this->getViewer($this->getAction());
@@ -673,7 +674,7 @@  discard block
 block discarded – undo
673 674
 	 * Tests whether a redirection has been requested. If redirect() has been called, it will return
674 675
 	 * the URL redirected to. Otherwise, it will return null.
675 676
 	 *
676
-	 * @return null|string
677
+	 * @return boolean
677 678
 	 */
678 679
 	public function redirectedTo() {
679 680
 		return $this->getResponse() && $this->getResponse()->getHeader('Location');
Please login to merge, or discard this patch.
control/RequestHandler.php 1 patch
Doc Comments   +6 added lines, -1 removed lines patch added patch discarded remove patch
@@ -121,6 +121,7 @@  discard block
 block discarded – undo
121 121
 
122 122
 	/**
123 123
 	 * Set the DataModel for this request.
124
+	 * @param DataModel $model
124 125
 	 */
125 126
 	public function setDataModel($model) {
126 127
 		$this->model = $model;
@@ -238,6 +239,9 @@  discard block
 block discarded – undo
238 239
 		return $this;
239 240
 	}
240 241
 
242
+	/**
243
+	 * @param SS_HTTPRequest $request
244
+	 */
241 245
 	protected function findAction($request) {
242 246
 		$handlerClass = ($this->class) ? $this->class : get_class($this);
243 247
 
@@ -271,7 +275,7 @@  discard block
 block discarded – undo
271 275
 	 *
272 276
 	 * Must not raise SS_HTTPResponse_Exceptions - instead it should return
273 277
 	 *
274
-	 * @param $request
278
+	 * @param SS_HTTPRequest $request
275 279
 	 * @param $action
276 280
 	 * @return SS_HTTPResponse
277 281
 	 */
@@ -384,6 +388,7 @@  discard block
 block discarded – undo
384 388
 
385 389
 	/**
386 390
 	 * Return the class that defines the given action, so that we know where to check allowed_actions.
391
+	 * @return string|null
387 392
 	 */
388 393
 	protected function definingClassForAction($actionOrigCasing) {
389 394
 		$action = strtolower($actionOrigCasing);
Please login to merge, or discard this patch.