Completed
Pull Request — 3.7 (#8242)
by Sam
09:16
created
view/SSViewer.php 1 patch
Doc Comments   +18 added lines, -5 removed lines patch added patch discarded remove patch
@@ -365,7 +365,6 @@  discard block
 block discarded – undo
365 365
 	/**
366 366
 	 * Returns the modulus of the numerical position of the item in the data set.
367 367
 	 * The count starts from $startIndex, which defaults to 1.
368
-	 * @param int $Mod The number to perform Mod operation to.
369 368
 	 * @param int $startIndex Number to start count from.
370 369
 	 * @return int
371 370
 	 */
@@ -415,6 +414,10 @@  discard block
 block discarded – undo
415 414
 	 */
416 415
 	protected $underlay;
417 416
 
417
+	/**
418
+	 * @param SS_Object $item
419
+	 * @param SS_Object $inheritedScope
420
+	 */
418 421
 	public function __construct($item, $overlay = null, $underlay = null, $inheritedScope = null) {
419 422
 		parent::__construct($item, $inheritedScope);
420 423
 
@@ -439,6 +442,10 @@  discard block
 block discarded – undo
439 442
 		$this->underlay = $underlay ? $underlay : array();
440 443
 	}
441 444
 
445
+	/**
446
+	 * @param string $interfaceToQuery
447
+	 * @param string $variableMethod
448
+	 */
442 449
 	protected function createCallableArray(&$extraArray, $interfaceToQuery, $variableMethod, $createObject = false) {
443 450
 		$implementers = ClassInfo::implementorsOf($interfaceToQuery);
444 451
 		if($implementers) foreach($implementers as $implementer) {
@@ -851,7 +858,7 @@  discard block
 block discarded – undo
851 858
 	 *
852 859
 	 * @param $className string - valid class name
853 860
 	 * @param $suffix string
854
-	 * @param $baseClass string
861
+	 * @param string $baseClass string
855 862
 	 *
856 863
 	 * @return array
857 864
 	 */
@@ -1254,9 +1261,9 @@  discard block
 block discarded – undo
1254 1261
 	 * Used by the <% include %> template tag to process templates.
1255 1262
 	 *
1256 1263
 	 * @param string $template Template name
1257
-	 * @param mixed $data Data context
1264
+	 * @param SS_Object $data Data context
1258 1265
 	 * @param array $arguments Additional arguments
1259
-	 * @return string Evaluated result
1266
+	 * @return HTMLText Evaluated result
1260 1267
 	 */
1261 1268
 	public static function execute_template($template, $data, $arguments = null, $scope = null) {
1262 1269
 		$v = new SSViewer($template);
@@ -1282,6 +1289,9 @@  discard block
 block discarded – undo
1282 1289
 		return $v->process($data, $arguments);
1283 1290
 	}
1284 1291
 
1292
+	/**
1293
+	 * @param string $content
1294
+	 */
1285 1295
 	public function parseTemplateContent($content, $template="") {
1286 1296
 		return $this->getParser()->compileString(
1287 1297
 			$content,
@@ -1310,7 +1320,7 @@  discard block
 block discarded – undo
1310 1320
 	 * Return an appropriate base tag for the given template.
1311 1321
 	 * It will be closed on an XHTML document, and unclosed on an HTML document.
1312 1322
 	 *
1313
-	 * @param $contentGeneratedSoFar The content of the template generated so far; it should contain
1323
+	 * @param string $contentGeneratedSoFar The content of the template generated so far; it should contain
1314 1324
 	 * the DOCTYPE declaration.
1315 1325
 	 */
1316 1326
 	public static function get_base_tag($contentGeneratedSoFar) {
@@ -1351,6 +1361,9 @@  discard block
 block discarded – undo
1351 1361
 	 */
1352 1362
 	protected $cacheTemplate;
1353 1363
 
1364
+	/**
1365
+	 * @param string $content
1366
+	 */
1354 1367
 	public function __construct($content, TemplateParser $parser = null) {
1355 1368
 		if ($parser) {
1356 1369
 			$this->setParser($parser);
Please login to merge, or discard this patch.
api/RestfulService.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -335,8 +335,8 @@
 block discarded – undo
335 335
 	/**
336 336
 	 * Extracts the response body and headers from a full curl response
337 337
 	 *
338
-	 * @param curl_handle $ch The curl handle for the request
339
-	 * @param string $rawResponse The raw response text
338
+	 * @param resource $ch The curl handle for the request
339
+	 * @param string $rawHeaders
340 340
 	 *
341 341
 	 * @return RestfulService_Response The response object
342 342
 	 */
Please login to merge, or discard this patch.
control/CookieJar.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -144,13 +144,13 @@
 block discarded – undo
144 144
 	 * @see http://uk3.php.net/manual/en/function.setcookie.php
145 145
 	 *
146 146
 	 * @param string $name The name of the cookie
147
-	 * @param string|array|false $value The value for the cookie to hold
147
+	 * @param false|string $value The value for the cookie to hold
148 148
 	 * @param int $expiry The number of days until expiry
149 149
 	 * @param string $path The path to save the cookie on (falls back to site base)
150 150
 	 * @param string $domain The domain to make the cookie available on
151 151
 	 * @param boolean $secure Can the cookie only be sent over SSL?
152 152
 	 * @param boolean $httpOnly Prevent the cookie being accessible by JS
153
-	 * @return boolean If the cookie was set or not; doesn't mean it's accepted by the browser
153
+	 * @return boolean|null If the cookie was set or not; doesn't mean it's accepted by the browser
154 154
 	 */
155 155
 	protected function outputCookie(
156 156
 		$name, $value, $expiry = 90, $path = null, $domain = null, $secure = false, $httpOnly = true
Please login to merge, or discard this patch.
model/DataObject.php 1 patch
Doc Comments   +14 added lines, -6 removed lines patch added patch discarded remove patch
@@ -385,6 +385,7 @@  discard block
 block discarded – undo
385 385
 	/**
386 386
 	 * Returns a list of all the composite if the given db field on the class is a composite field.
387 387
 	 * Will check all applicable ancestor classes and aggregate results.
388
+	 * @param string $class
388 389
 	 */
389 390
 	public static function composite_fields($class, $aggregated = true) {
390 391
 		if(!isset(DataObject::$_cache_composite_fields[$class])) self::cache_composite_fields($class);
@@ -552,7 +553,7 @@  discard block
 block discarded – undo
552 553
 	 * The destinationObject must be written to the database already and have an ID. Writing is performed
553 554
 	 * automatically when adding the new relations.
554 555
 	 *
555
-	 * @param $sourceObject the source object to duplicate from
556
+	 * @param DataObject $sourceObject the source object to duplicate from
556 557
 	 * @param $destinationObject the destination object to populate with the duplicated relations
557 558
 	 * @return DataObject with the new many_many relations copied in
558 559
 	 */
@@ -959,6 +960,7 @@  discard block
 block discarded – undo
959 960
 	 * @param $includeRelations Boolean Merge any existing relations (optional)
960 961
 	 * @param $overwriteWithEmpty Boolean Overwrite existing left values with empty right values.
961 962
 	 *                            Only applicable with $priority='right'. (optional)
963
+	 * @param DataObject|null $rightObj
962 964
 	 * @return Boolean
963 965
 	 */
964 966
 	public function merge($rightObj, $priority = 'right', $includeRelations = true, $overwriteWithEmpty = false) {
@@ -1582,10 +1584,10 @@  discard block
 block discarded – undo
1582 1584
 	 *
1583 1585
 	 * @param string $componentName Name of the component
1584 1586
 	 * @param string|null $filter Deprecated. A filter to be inserted into the WHERE clause
1585
-	 * @param string|null|array $sort Deprecated. A sort expression to be inserted into the ORDER BY clause. If omitted,
1587
+	 * @param string $sort Deprecated. A sort expression to be inserted into the ORDER BY clause. If omitted,
1586 1588
 	 *                                the static field $default_sort on the component class will be used.
1587 1589
 	 * @param string $join Deprecated, use leftJoin($table, $joinClause) instead
1588
-	 * @param string|null|array $limit Deprecated. A limit expression to be inserted into the LIMIT clause
1590
+	 * @param string $limit Deprecated. A limit expression to be inserted into the LIMIT clause
1589 1591
 	 *
1590 1592
 	 * @return HasManyList The components of the one-to-many relationship.
1591 1593
 	 */
@@ -2211,6 +2213,7 @@  discard block
 block discarded – undo
2211 2213
 	 *
2212 2214
 	 * This is experimental, and is currently only a Postgres-specific enhancement.
2213 2215
 	 *
2216
+	 * @param string $class
2214 2217
 	 * @return array or false
2215 2218
 	 */
2216 2219
 	public function database_extensions($class){
@@ -2678,7 +2681,7 @@  discard block
 block discarded – undo
2678 2681
 	 * can be saved into the Image table.
2679 2682
 	 *
2680 2683
 	 * @param string $fieldName Name of the field
2681
-	 * @param mixed $value New field value
2684
+	 * @param mixed $val New field value
2682 2685
 	 * @return DataObject $this
2683 2686
 	 */
2684 2687
 	public function setCastedField($fieldName, $val) {
@@ -2698,6 +2701,7 @@  discard block
 block discarded – undo
2698 2701
 
2699 2702
 	/**
2700 2703
 	 * {@inheritdoc}
2704
+	 * @param string $field
2701 2705
 	 */
2702 2706
 	public function castingHelper($field) {
2703 2707
 		if ($fieldSpec = $this->db($field)) {
@@ -3062,6 +3066,7 @@  discard block
 block discarded – undo
3062 3066
 	 * The path to the related field is specified with dot separated syntax (eg: Parent.Child.Child.FieldName)
3063 3067
 	 *
3064 3068
 	 * @param $fieldPath string
3069
+	 * @param string $fieldName
3065 3070
 	 * @return string | null - will return null on a missing value
3066 3071
 	 */
3067 3072
 	public function relField($fieldName) {
@@ -3130,7 +3135,7 @@  discard block
 block discarded – undo
3130 3135
 	 * @param string $callerClass The class of objects to be returned
3131 3136
 	 * @param string|array $filter A filter to be inserted into the WHERE clause.
3132 3137
 	 * Supports parameterised queries. See SQLQuery::addWhere() for syntax examples.
3133
-	 * @param string|array $sort A sort expression to be inserted into the ORDER
3138
+	 * @param string $sort A sort expression to be inserted into the ORDER
3134 3139
 	 * BY clause.  If omitted, self::$default_sort will be used.
3135 3140
 	 * @param string $join Deprecated 3.0 Join clause. Use leftJoin($table, $joinClause) instead.
3136 3141
 	 * @param string|array $limit A limit expression to be inserted into the LIMIT clause.
@@ -3181,6 +3186,7 @@  discard block
 block discarded – undo
3181 3186
 
3182 3187
 	/**
3183 3188
 	 * @deprecated
3189
+	 * @param string $class
3184 3190
 	 */
3185 3191
 	public function Aggregate($class = null) {
3186 3192
 		Deprecation::notice('4.0', 'Call aggregate methods on a DataList directly instead. In templates'
@@ -3202,6 +3208,7 @@  discard block
 block discarded – undo
3202 3208
 
3203 3209
 	/**
3204 3210
 	 * @deprecated
3211
+	 * @param string $relationship
3205 3212
 	 */
3206 3213
 	public function RelationshipAggregate($relationship) {
3207 3214
 		Deprecation::notice('4.0', 'Call aggregate methods on a relationship directly instead.');
@@ -3370,6 +3377,7 @@  discard block
 block discarded – undo
3370 3377
 
3371 3378
 	/**
3372 3379
 	 * @see $sourceQueryParams
3380
+	 * @param string $key
3373 3381
 	 * @return Mixed
3374 3382
 	 */
3375 3383
 	public function getSourceQueryParam($key) {
@@ -3433,7 +3441,7 @@  discard block
 block discarded – undo
3433 3441
 	 * Parses a specified column into a sort field and direction
3434 3442
 	 *
3435 3443
 	 * @param string $column String to parse containing the column name
3436
-	 * @return array Resolved table and column.
3444
+	 * @return string[] Resolved table and column.
3437 3445
 	 */
3438 3446
 	protected function parseSortColumn($column) {
3439 3447
 		// Parse column specification, considering possible ansi sql quoting
Please login to merge, or discard this patch.
control/Session.php 1 patch
Doc Comments   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -265,7 +265,6 @@  discard block
 block discarded – undo
265 265
 	 *
266 266
 	 * @deprecated 4.0 Use the "Session.timeout_ips" config setting instead
267 267
 	 *
268
-	 * @param array $session_ips Array of IPv4 rules.
269 268
 	 */
270 269
 	public static function set_timeout_ips($ips) {
271 270
 		Deprecation::notice('4.0', 'Use the "Session.timeout_ips" config setting instead');
@@ -462,6 +461,9 @@  discard block
 block discarded – undo
462 461
 		$diffVar[sizeof($var)-1] = $val;
463 462
 	}
464 463
 
464
+	/**
465
+	 * @param string $name
466
+	 */
465 467
 	public function inst_get($name) {
466 468
 		// Quicker execution path for "."-free names
467 469
 		if(strpos($name,'.') === false) {
Please login to merge, or discard this patch.
forms/gridfield/GridFieldExportButton.php 1 patch
Doc Comments   +2 added lines patch added patch discarded remove patch
@@ -91,6 +91,7 @@  discard block
 block discarded – undo
91 91
 
92 92
 	/**
93 93
 	 * Handle the export, for both the action button and the URL
94
+ 	 * @param GridField $gridField
94 95
  	 */
95 96
 	public function handleExport($gridField, $request = null) {
96 97
 		$now = Date("d-m-Y-H-i");
@@ -248,6 +249,7 @@  discard block
 block discarded – undo
248 249
 
249 250
 	/**
250 251
 	 * @param boolean
252
+	 * @param boolean $bool
251 253
 	 */
252 254
 	public function setCsvHasHeader($bool) {
253 255
 		$this->csvHasHeader = $bool;
Please login to merge, or discard this patch.
forms/FormAction.php 1 patch
Doc Comments   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
 
77 77
 	/**
78 78
 	 * @param array $properties
79
-	 * @return HTMLText
79
+	 * @return string
80 80
 	 */
81 81
 	public function Field($properties = array()) {
82 82
 		$properties = array_merge(
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
 
94 94
 	/**
95 95
 	 * @param array $properties
96
-	 * @return HTMLText
96
+	 * @return string
97 97
 	 */
98 98
 	public function FieldHolder($properties = array()) {
99 99
 		return $this->Field($properties);
@@ -157,6 +157,7 @@  discard block
 block discarded – undo
157 157
 	 * Enable or disable the rendering of this action as a `<button />`
158 158
 	 *
159 159
 	 * @param boolean
160
+	 * @param boolean $bool
160 161
 	 * @return $this
161 162
 	 */
162 163
 	public function setUseButtonTag($bool) {
Please login to merge, or discard this patch.
admin/code/CMSMenu.php 1 patch
Doc Comments   +5 added lines, -3 removed lines patch added patch discarded remove patch
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
 	 *                          left.
87 87
 	 * @param array $attributes an array of attributes to include on the link.
88 88
 	 *
89
-	 * @return boolean The result of the operation.
89
+	 * @return boolean|null The result of the operation.
90 90
 	 */
91 91
 	public static function add_link($code, $menuTitle, $url, $priority = -1, $attributes = null) {
92 92
 		return self::add_menu_item($code, $menuTitle, $url, null, $priority, $attributes);
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
 	 * @param int $priority
108 108
 	 * @param array $attributes an array of attributes to include on the link.
109 109
 	 *
110
-	 * @return boolean Success
110
+	 * @return boolean|null Success
111 111
 	 */
112 112
 	public static function add_menu_item($code, $menuTitle, $url, $controllerClass = null, $priority = -1,
113 113
 											$attributes = null) {
@@ -239,7 +239,7 @@  discard block
 block discarded – undo
239 239
 	 * @param int $priority
240 240
 	 * @param array $attributes an array of attributes to include on the link.
241 241
 	 *
242
-	 * @return boolean Success
242
+	 * @return boolean|null Success
243 243
 	 */
244 244
 	public static function replace_menu_item($code, $menuTitle, $url, $controllerClass = null, $priority = -1,
245 245
 												$attributes = null) {
@@ -258,6 +258,8 @@  discard block
 block discarded – undo
258 258
 
259 259
 	/**
260 260
 	 * Add a previously built menu item object to the menu
261
+	 * @param string $code
262
+	 * @param CMSMenuItem $cmsMenuItem
261 263
 	 */
262 264
 	protected static function add_menu_item_obj($code, $cmsMenuItem) {
263 265
 		self::$menu_item_changes[] = array(
Please login to merge, or discard this patch.
admin/code/ModelAdmin.php 1 patch
Doc Comments   +5 added lines, -1 removed lines patch added patch discarded remove patch
@@ -120,6 +120,9 @@  discard block
 block discarded – undo
120 120
 		Requirements::javascript(FRAMEWORK_ADMIN_DIR . '/javascript/ModelAdmin.js');
121 121
 	}
122 122
 
123
+	/**
124
+	 * @param string $action
125
+	 */
123 126
 	public function Link($action = null) {
124 127
 		if(!$action) $action = $this->sanitiseClassName($this->modelClass);
125 128
 		return parent::Link($action);
@@ -274,6 +277,7 @@  discard block
 block discarded – undo
274 277
 
275 278
 	/**
276 279
 	 * Unsanitise a model class' name from a URL param
280
+	 * @param string $class
277 281
 	 * @return string
278 282
 	 */
279 283
 	protected function unsanitiseClassName($class) {
@@ -414,7 +418,7 @@  discard block
 block discarded – undo
414 418
 	 * @param array $data
415 419
 	 * @param Form $form
416 420
 	 * @param SS_HTTPRequest $request
417
-	 * @return bool|null
421
+	 * @return false|null
418 422
 	 */
419 423
 	public function import($data, $form, $request) {
420 424
 		if(!$this->showImportForm || (is_array($this->showImportForm)
Please login to merge, or discard this patch.