Completed
Pull Request — master (#5835)
by Matt
10:23
created
view/SSViewer.php 1 patch
Doc Comments   +15 added lines, -6 removed lines patch added patch discarded remove patch
@@ -370,7 +370,6 @@  discard block
 block discarded – undo
370 370
 	/**
371 371
 	 * Returns the modulus of the numerical position of the item in the data set.
372 372
 	 * The count starts from $startIndex, which defaults to 1.
373
-	 * @param int $Mod The number to perform Mod operation to.
374 373
 	 * @param int $startIndex Number to start count from.
375 374
 	 * @return int
376 375
 	 */
@@ -444,6 +443,10 @@  discard block
 block discarded – undo
444 443
 		$this->underlay = $underlay ? $underlay : array();
445 444
 	}
446 445
 
446
+	/**
447
+	 * @param string $interfaceToQuery
448
+	 * @param string $variableMethod
449
+	 */
447 450
 	protected function createCallableArray(&$extraArray, $interfaceToQuery, $variableMethod, $createObject = false) {
448 451
 		$implementers = ClassInfo::implementorsOf($interfaceToQuery);
449 452
 		if($implementers) foreach($implementers as $implementer) {
@@ -818,7 +821,7 @@  discard block
 block discarded – undo
818 821
 	 * Assign the list of active themes to apply.
819 822
 	 * If default themes should be included add $default as the last entry.
820 823
 	 *
821
-	 * @param array $themes
824
+	 * @param string[] $themes
822 825
 	 */
823 826
 	public static function set_themes($themes = []) {
824 827
 		Config::inst()->remove('SSViewer', 'themes');
@@ -863,7 +866,7 @@  discard block
 block discarded – undo
863 866
 	 *
864 867
 	 * @param $className string - valid class name
865 868
 	 * @param $suffix string
866
-	 * @param $baseClass string
869
+	 * @param string $baseClass string
867 870
 	 *
868 871
 	 * @return array
869 872
 	 */
@@ -893,7 +896,7 @@  discard block
 block discarded – undo
893 896
 	}
894 897
 
895 898
 	/**
896
-	 * @param string|array $templateList If passed as a string with .ss extension, used as the "main" template.
899
+	 * @param string|array $templates If passed as a string with .ss extension, used as the "main" template.
897 900
 	 *  If passed as an array, it can be used for template inheritance (first found template "wins").
898 901
 	 *  Usually the array values are PHP class names, which directly correlate to template names.
899 902
 	 *  <code>
@@ -1246,7 +1249,7 @@  discard block
 block discarded – undo
1246 1249
 	 * @param string $template Template name
1247 1250
 	 * @param mixed $data Data context
1248 1251
 	 * @param array $arguments Additional arguments
1249
-	 * @return string Evaluated result
1252
+	 * @return DBHTMLText Evaluated result
1250 1253
 	 */
1251 1254
 	public static function execute_template($template, $data, $arguments = null, $scope = null) {
1252 1255
 		$v = new SSViewer($template);
@@ -1272,6 +1275,9 @@  discard block
 block discarded – undo
1272 1275
 		return $v->process($data, $arguments);
1273 1276
 	}
1274 1277
 
1278
+	/**
1279
+	 * @param string $content
1280
+	 */
1275 1281
 	public function parseTemplateContent($content, $template="") {
1276 1282
 		return $this->getParser()->compileString(
1277 1283
 			$content,
@@ -1301,7 +1307,7 @@  discard block
 block discarded – undo
1301 1307
 	 * Return an appropriate base tag for the given template.
1302 1308
 	 * It will be closed on an XHTML document, and unclosed on an HTML document.
1303 1309
 	 *
1304
-	 * @param $contentGeneratedSoFar The content of the template generated so far; it should contain
1310
+	 * @param string $contentGeneratedSoFar The content of the template generated so far; it should contain
1305 1311
 	 * the DOCTYPE declaration.
1306 1312
 	 */
1307 1313
 	public static function get_base_tag($contentGeneratedSoFar) {
@@ -1342,6 +1348,9 @@  discard block
 block discarded – undo
1342 1348
 	 */
1343 1349
 	protected $cacheTemplate;
1344 1350
 
1351
+	/**
1352
+	 * @param string $content
1353
+	 */
1345 1354
 	public function __construct($content, TemplateParser $parser = null) {
1346 1355
 		if ($parser) {
1347 1356
 			$this->setParser($parser);
Please login to merge, or discard this patch.
admin/code/LeftAndMain.php 1 patch
Doc Comments   +8 added lines, -2 removed lines patch added patch discarded remove patch
@@ -207,7 +207,7 @@  discard block
 block discarded – undo
207 207
 	/**
208 208
 	 * Gets the combined configuration of all LeafAndMain subclasses required by the client app.
209 209
 	 *
210
-	 * @return array
210
+	 * @return string
211 211
 	 *
212 212
 	 * WARNING: Experimental API
213 213
 	 */
@@ -639,6 +639,9 @@  discard block
 block discarded – undo
639 639
 		}
640 640
 	}
641 641
 
642
+	/**
643
+	 * @param SS_HTTPRequest $request
644
+	 */
642 645
 	public function index($request) {
643 646
 		return $this->getResponseNegotiator()->respond($request);
644 647
 	}
@@ -1953,7 +1956,7 @@  discard block
 block discarded – undo
1953 1956
 	}
1954 1957
 
1955 1958
 	/**
1956
-	 * @return String
1959
+	 * @return DBField
1957 1960
 	 */
1958 1961
 	public function Locale() {
1959 1962
 		return DBField::create_field('Locale', i18n::get_locale());
@@ -2119,6 +2122,9 @@  discard block
 block discarded – undo
2119 2122
 		return (parent::isFinished() || $this->isFinished);
2120 2123
 	}
2121 2124
 
2125
+	/**
2126
+	 * @param boolean $bool
2127
+	 */
2122 2128
 	public function setIsFinished($bool) {
2123 2129
 		$this->isFinished = $bool;
2124 2130
 	}
Please login to merge, or discard this patch.
control/HTTPRequest.php 1 patch
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -385,9 +385,9 @@  discard block
 block discarded – undo
385 385
 	 * it's only advisable to send small files through this method.
386 386
 	 *
387 387
 	 * @static
388
-	 * @param $fileData
388
+	 * @param string $fileData
389 389
 	 * @param $fileName
390
-	 * @param null $mimeType
390
+	 * @param string $mimeType
391 391
 	 * @return SS_HTTPResponse
392 392
 	 */
393 393
 	public static function send_file($fileData, $fileName, $mimeType = null) {
@@ -605,7 +605,7 @@  discard block
 block discarded – undo
605 605
 	 * This is used by the request handler to prevent infinite parsing loops.
606 606
 	 *
607 607
 	 * @param $pattern
608
-	 * @return bool
608
+	 * @return boolean|null
609 609
 	 */
610 610
 	public function isEmptyPattern($pattern) {
611 611
 		if(preg_match('/^([A-Za-z]+) +(.*)$/', $pattern, $matches)) {
Please login to merge, or discard this patch.
control/HTTPResponse.php 1 patch
Doc Comments   +7 added lines, -6 removed lines patch added patch discarded remove patch
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
 	 *  No newlines are allowed in the description.
110 110
 	 *  If omitted, will default to the standard HTTP description
111 111
 	 *  for the given $code value (see {@link $status_codes}).
112
-	 * @return SS_HTTPRequest $this
112
+	 * @return SS_HTTPResponse $this
113 113
 	 */
114 114
 	public function setStatusCode($code, $description = null) {
115 115
 		if(isset(self::$status_codes[$code])) $this->statusCode = $code;
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
 	 * Caution: Will be overwritten by {@link setStatusCode()}.
126 126
 	 *
127 127
 	 * @param string $description
128
-	 * @return SS_HTTPRequest $this
128
+	 * @return SS_HTTPResponse $this
129 129
 	 */
130 130
 	public function setStatusDescription($description) {
131 131
 		$this->statusDescription = $description;
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
 
158 158
 	/**
159 159
 	 * @param string $body
160
-	 * @return SS_HTTPRequest $this
160
+	 * @return SS_HTTPResponse $this
161 161
 	 */
162 162
 	public function setBody($body) {
163 163
 		$this->body = $body ? (string) $body : $body; // Don't type-cast false-ish values, eg null is null not ''
@@ -176,7 +176,7 @@  discard block
 block discarded – undo
176 176
 	 *
177 177
 	 * @param string $header Example: "Content-Type"
178 178
 	 * @param string $value Example: "text/xml"
179
-	 * @return SS_HTTPRequest $this
179
+	 * @return SS_HTTPResponse $this
180 180
 	 */
181 181
 	public function addHeader($header, $value) {
182 182
 		$this->headers[$header] = $value;
@@ -206,7 +206,7 @@  discard block
 block discarded – undo
206 206
 	 * e.g. "Content-Type".
207 207
 	 *
208 208
 	 * @param string $header
209
-	 * @return SS_HTTPRequest $this
209
+	 * @return SS_HTTPResponse $this
210 210
 	 */
211 211
 	public function removeHeader($header) {
212 212
 		if(isset($this->headers[$header])) unset($this->headers[$header]);
@@ -216,7 +216,7 @@  discard block
 block discarded – undo
216 216
 	/**
217 217
 	 * @param string $dest
218 218
 	 * @param int $code
219
-	 * @return SS_HTTPRequest $this
219
+	 * @return SS_HTTPResponse $this
220 220
 	 */
221 221
 	public function redirect($dest, $code=302) {
222 222
 		if(!in_array($code, self::$redirect_codes)) $code = 302;
@@ -316,6 +316,7 @@  discard block
 block discarded – undo
316 316
 	 * @param string|SS_HTTPResponse body Either the plaintext content of the error message, or an SS_HTTPResponse
317 317
 	 *                                     object representing it.  In either case, the $statusCode and
318 318
 	 *                                     $statusDescription will be the HTTP status of the resulting response.
319
+	 * @param string $statusDescription
319 320
 	 * @see SS_HTTPResponse::__construct();
320 321
 	 */
321 322
 	public function __construct($body = null, $statusCode = null, $statusDescription = null) {
Please login to merge, or discard this patch.
forms/TextField.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@
 block discarded – undo
12 12
 
13 13
 	/**
14 14
 	 * @param array $properties
15
-	 * @return string
15
+	 * @return DBHTMLText
16 16
 	 */
17 17
 	public function FieldHolder($properties = array()) {
18 18
 		return $this->Field($properties);
Please login to merge, or discard this patch.
ORM/Connect/Database.php 1 patch
Doc Comments   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -718,7 +718,7 @@  discard block
 block discarded – undo
718 718
 	 * @param boolean $create Flag indicating whether the database should be created
719 719
 	 * if it doesn't exist. If $create is false and the database doesn't exist
720 720
 	 * then an error will be raised
721
-	 * @param int|boolean $errorLevel The level of error reporting to enable for the query, or false if no error
721
+	 * @param boolean $errorLevel The level of error reporting to enable for the query, or false if no error
722 722
 	 * should be raised
723 723
 	 * @return boolean Flag indicating success
724 724
 	 */
@@ -883,6 +883,7 @@  discard block
 block discarded – undo
883 883
 
884 884
 	/**
885 885
 	 * @deprecated since version 4.0 Use DB::field_list instead
886
+	 * @param string $table
886 887
 	 */
887 888
 	public function fieldList($table) {
888 889
 		Deprecation::notice('4.0', 'Use DB::field_list instead');
Please login to merge, or discard this patch.
ORM/FieldType/DBField.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -477,7 +477,7 @@
 block discarded – undo
477 477
 	}
478 478
 
479 479
 	/**
480
-	 * @param array $value
480
+	 * @param string $value
481 481
 	 * @return $this
482 482
 	 */
483 483
 	public function setArrayValue($value) {
Please login to merge, or discard this patch.
parsers/URLSegmentFilter.php 1 patch
Doc Comments   +1 added lines patch added patch discarded remove patch
@@ -89,6 +89,7 @@
 block discarded – undo
89 89
 	 * Determines if the field should render open or closed by default.
90 90
 	 * 
91 91
 	 * @param boolean
92
+	 * @param boolean $bool
92 93
 	 */
93 94
 	public function startClosed($bool) {
94 95
 		($bool) ? $this->addExtraClass('startClosed') : $this->removeExtraClass('startClosed');
Please login to merge, or discard this patch.
thirdparty/Zend/Cache/Backend/BlackHole.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
      * Test if a cache is available or not (for the given id)
57 57
      *
58 58
      * @param  string $id cache id
59
-     * @return mixed false (a cache is not available) or "last modified" timestamp (int) of the available cache record
59
+     * @return boolean false (a cache is not available) or "last modified" timestamp (int) of the available cache record
60 60
      */
61 61
     public function test($id)
62 62
     {
@@ -192,7 +192,7 @@  discard block
 block discarded – undo
192 192
      * - mtime : timestamp of last modification time
193 193
      *
194 194
      * @param  string $id cache id
195
-     * @return array array of metadatas (false if the cache id is not found)
195
+     * @return boolean array of metadatas (false if the cache id is not found)
196 196
      */
197 197
     public function getMetadatas($id)
198 198
     {
Please login to merge, or discard this patch.