Completed
Pull Request — 3.4 (#6867)
by Gregory
09:46
created
forms/TreeDropdownField.php 1 patch
Doc Comments   +3 added lines, -4 removed lines patch added patch discarded remove patch
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
 	 *
77 77
 	 * @param string $name the field name
78 78
 	 * @param string $title the field label
79
-	 * @param string|array $sourceObject The object-type to list in the tree. This could
79
+	 * @param string $sourceObject The object-type to list in the tree. This could
80 80
 	 * be one of the following:
81 81
 	 * - A DataObject class name with the {@link Hierarchy} extension.
82 82
 	 * - An array of key/value pairs, like a {@link DropdownField} source. In
@@ -204,7 +204,7 @@  discard block
 block discarded – undo
204 204
 	}
205 205
 
206 206
 	/**
207
-	 * @return HTMLText
207
+	 * @return string
208 208
 	 */
209 209
 	public function Field($properties = array()) {
210 210
 		Requirements::add_i18n_javascript(FRAMEWORK_DIR . '/javascript/lang');
@@ -385,7 +385,7 @@  discard block
 block discarded – undo
385 385
 	 * If a filter function has been set, that will be called. And if search text is set,
386 386
 	 * filter on that too. Return true if all applicable conditions are true, false otherwise.
387 387
 	 * @param $node
388
-	 * @return unknown_type
388
+	 * @return boolean
389 389
 	 */
390 390
 	public function filterMarking($node) {
391 391
 		if ($this->filterCallback && !call_user_func($this->filterCallback, $node)) return false;
@@ -436,7 +436,6 @@  discard block
 block discarded – undo
436 436
 	}
437 437
 
438 438
 	/**
439
-	 * @param String $field
440 439
 	 */
441 440
 	public function setSourceObject($class) {
442 441
 		$this->sourceObject = $class;
Please login to merge, or discard this patch.
model/connect/Database.php 1 patch
Doc Comments   +4 added lines, -1 removed lines patch added patch discarded remove patch
@@ -385,6 +385,7 @@  discard block
 block discarded – undo
385 385
 	 * - minutes
386 386
 	 * - seconds
387 387
 	 * This includes the singular forms as well
388
+	 * @param string $date
388 389
 	 * @return string SQL datetime expression to query for a datetime (YYYY-MM-DD hh:mm:ss) which is the result of
389 390
 	 *                the addition
390 391
 	 */
@@ -398,6 +399,7 @@  discard block
 block discarded – undo
398 399
 	 *                       e.g. '"SiteTree"."Created"'
399 400
 	 * @param string $date2 to be substracted of $date1, can be either 'now', literal datetime
400 401
 	 *                      like '1973-10-14 10:30:00' or field name, e.g. '"SiteTree"."Created"'
402
+	 * @param string $date1
401 403
 	 * @return string SQL datetime expression to query for the interval between $date1 and $date2 in seconds which
402 404
 	 *                is the result of the substraction
403 405
 	 */
@@ -625,7 +627,7 @@  discard block
 block discarded – undo
625 627
 	 * @param boolean $create Flag indicating whether the database should be created
626 628
 	 * if it doesn't exist. If $create is false and the database doesn't exist
627 629
 	 * then an error will be raised
628
-	 * @param int|boolean $errorLevel The level of error reporting to enable for the query, or false if no error
630
+	 * @param boolean $errorLevel The level of error reporting to enable for the query, or false if no error
629 631
 	 * should be raised
630 632
 	 * @return boolean Flag indicating success
631 633
 	 */
@@ -785,6 +787,7 @@  discard block
 block discarded – undo
785 787
 
786 788
 	/**
787 789
 	 * @deprecated since version 4.0 Use DB::field_list instead
790
+	 * @param string $table
788 791
 	 */
789 792
 	public function fieldList($table) {
790 793
 		Deprecation::notice('4.0', 'Use DB::field_list instead');
Please login to merge, or discard this patch.
model/DataObject.php 1 patch
Doc Comments   +13 added lines, -6 removed lines patch added patch discarded remove patch
@@ -549,7 +549,7 @@  discard block
 block discarded – undo
549 549
 	 * The destinationObject must be written to the database already and have an ID. Writing is performed
550 550
 	 * automatically when adding the new relations.
551 551
 	 *
552
-	 * @param $sourceObject the source object to duplicate from
552
+	 * @param DataObject $sourceObject the source object to duplicate from
553 553
 	 * @param $destinationObject the destination object to populate with the duplicated relations
554 554
 	 * @return DataObject with the new many_many relations copied in
555 555
 	 */
@@ -956,6 +956,7 @@  discard block
 block discarded – undo
956 956
 	 * @param $includeRelations Boolean Merge any existing relations (optional)
957 957
 	 * @param $overwriteWithEmpty Boolean Overwrite existing left values with empty right values.
958 958
 	 *                            Only applicable with $priority='right'. (optional)
959
+	 * @param DataObject|null $rightObj
959 960
 	 * @return Boolean
960 961
 	 */
961 962
 	public function merge($rightObj, $priority = 'right', $includeRelations = true, $overwriteWithEmpty = false) {
@@ -1579,10 +1580,10 @@  discard block
 block discarded – undo
1579 1580
 	 *
1580 1581
 	 * @param string $componentName Name of the component
1581 1582
 	 * @param string|null $filter Deprecated. A filter to be inserted into the WHERE clause
1582
-	 * @param string|null|array $sort Deprecated. A sort expression to be inserted into the ORDER BY clause. If omitted,
1583
+	 * @param string $sort Deprecated. A sort expression to be inserted into the ORDER BY clause. If omitted,
1583 1584
 	 *                                the static field $default_sort on the component class will be used.
1584 1585
 	 * @param string $join Deprecated, use leftJoin($table, $joinClause) instead
1585
-	 * @param string|null|array $limit Deprecated. A limit expression to be inserted into the LIMIT clause
1586
+	 * @param string $limit Deprecated. A limit expression to be inserted into the LIMIT clause
1586 1587
 	 *
1587 1588
 	 * @return HasManyList The components of the one-to-many relationship.
1588 1589
 	 */
@@ -1642,7 +1643,7 @@  discard block
 block discarded – undo
1642 1643
 	/**
1643 1644
 	 * Find the foreign class of a relation on this DataObject, regardless of the relation type.
1644 1645
 	 *
1645
-	 * @param $relationName Relation name.
1646
+	 * @param string $relationName Relation name.
1646 1647
 	 * @return string Class name, or null if not found.
1647 1648
 	 */
1648 1649
 	public function getRelationClass($relationName) {
@@ -2208,6 +2209,7 @@  discard block
 block discarded – undo
2208 2209
 	 *
2209 2210
 	 * This is experimental, and is currently only a Postgres-specific enhancement.
2210 2211
 	 *
2212
+	 * @param string $class
2211 2213
 	 * @return array or false
2212 2214
 	 */
2213 2215
 	public function database_extensions($class){
@@ -2675,7 +2677,7 @@  discard block
 block discarded – undo
2675 2677
 	 * can be saved into the Image table.
2676 2678
 	 *
2677 2679
 	 * @param string $fieldName Name of the field
2678
-	 * @param mixed $value New field value
2680
+	 * @param mixed $val New field value
2679 2681
 	 * @return DataObject $this
2680 2682
 	 */
2681 2683
 	public function setCastedField($fieldName, $val) {
@@ -2695,6 +2697,7 @@  discard block
 block discarded – undo
2695 2697
 
2696 2698
 	/**
2697 2699
 	 * {@inheritdoc}
2700
+	 * @param string $field
2698 2701
 	 */
2699 2702
 	public function castingHelper($field) {
2700 2703
 		if ($fieldSpec = $this->db($field)) {
@@ -3059,6 +3062,7 @@  discard block
 block discarded – undo
3059 3062
 	 * The path to the related field is specified with dot separated syntax (eg: Parent.Child.Child.FieldName)
3060 3063
 	 *
3061 3064
 	 * @param $fieldPath string
3065
+	 * @param string $fieldName
3062 3066
 	 * @return string | null - will return null on a missing value
3063 3067
 	 */
3064 3068
 	public function relField($fieldName) {
@@ -3127,7 +3131,7 @@  discard block
 block discarded – undo
3127 3131
 	 * @param string $callerClass The class of objects to be returned
3128 3132
 	 * @param string|array $filter A filter to be inserted into the WHERE clause.
3129 3133
 	 * Supports parameterised queries. See SQLQuery::addWhere() for syntax examples.
3130
-	 * @param string|array $sort A sort expression to be inserted into the ORDER
3134
+	 * @param string $sort A sort expression to be inserted into the ORDER
3131 3135
 	 * BY clause.  If omitted, self::$default_sort will be used.
3132 3136
 	 * @param string $join Deprecated 3.0 Join clause. Use leftJoin($table, $joinClause) instead.
3133 3137
 	 * @param string|array $limit A limit expression to be inserted into the LIMIT clause.
@@ -3178,6 +3182,7 @@  discard block
 block discarded – undo
3178 3182
 
3179 3183
 	/**
3180 3184
 	 * @deprecated
3185
+	 * @param string $class
3181 3186
 	 */
3182 3187
 	public function Aggregate($class = null) {
3183 3188
 		Deprecation::notice('4.0', 'Call aggregate methods on a DataList directly instead. In templates'
@@ -3199,6 +3204,7 @@  discard block
 block discarded – undo
3199 3204
 
3200 3205
 	/**
3201 3206
 	 * @deprecated
3207
+	 * @param string $relationship
3202 3208
 	 */
3203 3209
 	public function RelationshipAggregate($relationship) {
3204 3210
 		Deprecation::notice('4.0', 'Call aggregate methods on a relationship directly instead.');
@@ -3367,6 +3373,7 @@  discard block
 block discarded – undo
3367 3373
 
3368 3374
 	/**
3369 3375
 	 * @see $sourceQueryParams
3376
+	 * @param string $key
3370 3377
 	 * @return Mixed
3371 3378
 	 */
3372 3379
 	public function getSourceQueryParam($key) {
Please login to merge, or discard this patch.
model/Image.php 1 patch
Doc Comments   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -589,7 +589,7 @@  discard block
 block discarded – undo
589 589
 	/**
590 590
 	 * Resize this image for the CMS. Use in templates with $CMSThumbnail
591 591
 	 *
592
-	 * @return Image_Cached|null
592
+	 * @return Image|null
593 593
 	 */
594 594
 	public function CMSThumbnail() {
595 595
 		return $this->Pad($this->stat('cms_thumbnail_width'),$this->stat('cms_thumbnail_height'));
@@ -631,7 +631,7 @@  discard block
 block discarded – undo
631 631
 	/**
632 632
 	 * Resize this image for use as a thumbnail in a strip. Use in templates with $StripThumbnail.
633 633
 	 *
634
-	 * @return Image_Cached|null
634
+	 * @return Image|null
635 635
 	 */
636 636
 	public function StripThumbnail() {
637 637
 		return $this->Fill($this->stat('strip_thumbnail_width'),$this->stat('strip_thumbnail_height'));
@@ -868,7 +868,7 @@  discard block
 block discarded – undo
868 868
 	/**
869 869
 	 * Generate patterns that will help to match filenames of cached images
870 870
 	 * @param string $filename Filename of source image
871
-	 * @return array
871
+	 * @return string
872 872
 	 */
873 873
 	private function getFilenamePatterns($filename) {
874 874
 		$methodNames = $this->allMethodNames(true);
@@ -1024,7 +1024,7 @@  discard block
 block discarded – undo
1024 1024
 
1025 1025
 	/**
1026 1026
 	 * Get the orientation of this image.
1027
-	 * @return ORIENTATION_SQUARE | ORIENTATION_PORTRAIT | ORIENTATION_LANDSCAPE
1027
+	 * @return integer | ORIENTATION_PORTRAIT | ORIENTATION_LANDSCAPE
1028 1028
 	 */
1029 1029
 	public function getOrientation() {
1030 1030
 		$width = $this->getWidth();
Please login to merge, or discard this patch.
oembed/Oembed.php 1 patch
Doc Comments   +6 added lines, -1 removed lines patch added patch discarded remove patch
@@ -46,6 +46,7 @@  discard block
 block discarded – undo
46 46
 	 *
47 47
 	 * @param $url Human-readable URL.
48 48
 	 * @returns string/bool URL of an endpoint, or false if no matching provider exists.
49
+	 * @return string
49 50
 	 */
50 51
 	protected static function find_endpoint($url) {
51 52
 		foreach(self::get_providers() as $scheme=>$endpoint) {
@@ -117,7 +118,7 @@  discard block
 block discarded – undo
117 118
 	 * Given a response body, determine if there is an autodiscover url
118 119
 	 *
119 120
 	 * @param string $body
120
-	 * @return bool|string
121
+	 * @return string|false
121 122
 	 */
122 123
 	public static function autodiscover_from_body($body) {
123 124
 		// Look within the body for an oembed link.
@@ -259,6 +260,9 @@  discard block
 block discarded – undo
259 260
 		parent::__construct();
260 261
 	}
261 262
 
263
+	/**
264
+	 * @return string
265
+	 */
262 266
 	public function getOembedURL() {
263 267
 		return $this->url;
264 268
 	}
@@ -343,6 +347,7 @@  discard block
 block discarded – undo
343 347
 
344 348
 	/**
345 349
 	 * Wrap the check for looking into Oembed JSON within $this->data.
350
+	 * @param string $field
346 351
 	 */
347 352
 	public function hasField($field) {
348 353
 		$this->loadData();
Please login to merge, or discard this patch.
security/Security.php 1 patch
Doc Comments   +4 added lines, -5 removed lines patch added patch discarded remove patch
@@ -466,7 +466,7 @@  discard block
 block discarded – undo
466 466
 	 * Combine the given forms into a formset with a tabbed interface
467 467
 	 *
468 468
 	 * @param array $forms List of LoginForm instances
469
-	 * @return string
469
+	 * @return HTMLText
470 470
 	 */
471 471
 	protected function generateLoginFormSet($forms) {
472 472
 		$viewData = new ArrayData(array(
@@ -646,7 +646,6 @@  discard block
 block discarded – undo
646 646
 	 * - t: plaintext token
647 647
 	 *
648 648
 	 * @param Member $member Member object associated with this link.
649
-	 * @param string $autoLoginHash The auto login token.
650 649
 	 */
651 650
 	public static function getPasswordResetLink($member, $autologinToken) {
652 651
 		$autologinToken = urldecode($autologinToken);
@@ -737,7 +736,7 @@  discard block
 block discarded – undo
737 736
 	/**
738 737
 	 * Factory method for the lost password form
739 738
 	 *
740
-	 * @return Form Returns the lost password form
739
+	 * @return Security Returns the lost password form
741 740
 	 */
742 741
 	public function ChangePasswordForm() {
743 742
 		return Object::create('ChangePasswordForm', $this, 'ChangePasswordForm');
@@ -921,7 +920,7 @@  discard block
 block discarded – undo
921 920
 	 * @deprecated 4.0 Use the "Security.password_encryption_algorithm" config setting instead
922 921
 	 * @param string $algorithm One of the available password encryption
923 922
 	 *  algorithms determined by {@link Security::get_encryption_algorithms()}
924
-	 * @return bool Returns TRUE if the passed algorithm was valid, otherwise FALSE.
923
+	 * @return boolean|null Returns TRUE if the passed algorithm was valid, otherwise FALSE.
925 924
 	 */
926 925
 	public static function set_password_encryption_algorithm($algorithm) {
927 926
 		Deprecation::notice('4.0', 'Use the "Security.password_encryption_algorithm" config setting instead');
@@ -1076,7 +1075,7 @@  discard block
 block discarded – undo
1076 1075
 	/**
1077 1076
 	 * Set to true to ignore access to disallowed actions, rather than returning permission failure
1078 1077
 	 * Note that this is just a flag that other code needs to check with Security::ignore_disallowed_actions()
1079
-	 * @param $flag True or false
1078
+	 * @param boolean $flag True or false
1080 1079
 	 */
1081 1080
 	public static function set_ignore_disallowed_actions($flag) {
1082 1081
 		self::$ignore_disallowed_actions = $flag;
Please login to merge, or discard this patch.
model/Versioned.php 1 patch
Doc Comments   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -764,7 +764,7 @@  discard block
 block discarded – undo
764 764
 	 * Extend permissions to include additional security for objects that are not published to live.
765 765
 	 *
766 766
 	 * @param Member $member
767
-	 * @return bool|null
767
+	 * @return false|null
768 768
 	 */
769 769
 	public function canView($member = null) {
770 770
 		// Invoke default version-gnostic canView
@@ -838,7 +838,7 @@  discard block
 block discarded – undo
838 838
 	 *
839 839
 	 * @param string $stage
840 840
 	 * @param Member $member
841
-	 * @return bool
841
+	 * @return boolean|string
842 842
 	 */
843 843
 	public function canViewStage($stage = 'Live', $member = null) {
844 844
 		$oldMode = Versioned::get_reading_mode();
@@ -904,7 +904,7 @@  discard block
 block discarded – undo
904 904
 	/**
905 905
 	 * Get the latest published version of this object.
906 906
 	 *
907
-	 * @return DataObject
907
+	 * @return string
908 908
 	 */
909 909
 	public function latestPublished() {
910 910
 		// Get the root data object class - this will have the version field
@@ -1028,7 +1028,7 @@  discard block
 block discarded – undo
1028 1028
 	 * @param string $limit
1029 1029
 	 * @param string $join Deprecated, use leftJoin($table, $joinClause) instead
1030 1030
 	 * @param string $having
1031
-	 * @return DataList
1031
+	 * @return ArrayList
1032 1032
 	 */
1033 1033
 	public function Versions($filter = "", $sort = "", $limit = "", $join = "", $having = "") {
1034 1034
 		return $this->allVersions($filter, $sort, $limit, $join, $having);
@@ -1042,7 +1042,7 @@  discard block
 block discarded – undo
1042 1042
 	 * @param  string $limit
1043 1043
 	 * @param  string $join Deprecated, use leftJoin($table, $joinClause) instead
1044 1044
 	 * @param  string $having
1045
-	 * @return DataList
1045
+	 * @return ArrayList
1046 1046
 	 */
1047 1047
 	public function allVersions($filter = "", $sort = "", $limit = "", $join = "", $having = "") {
1048 1048
 		// Make sure the table names are not postfixed (e.g. _Live)
@@ -1360,7 +1360,7 @@  discard block
 block discarded – undo
1360 1360
 	 * @param string     $filter         A filter to be inserted into the WHERE clause.
1361 1361
 	 * @param string     $sort           A sort expression to be inserted into the ORDER BY clause.
1362 1362
 	 * @param string     $join           Deprecated, use leftJoin($table, $joinClause) instead
1363
-	 * @param string|int $limit          A limit on the number of records returned from the database.
1363
+	 * @param integer $limit          A limit on the number of records returned from the database.
1364 1364
 	 * @param string     $containerClass The container class for the result set (default is DataList)
1365 1365
 	 *
1366 1366
 	 * @return DataList A modified DataList designated to the specified stage
Please login to merge, or discard this patch.
email/Email.php 1 patch
Doc Comments   +10 added lines, -2 removed lines patch added patch discarded remove patch
@@ -197,6 +197,10 @@  discard block
 block discarded – undo
197 197
 		Deprecation::notice('4.0', 'Use "emailbouncehandler" module');
198 198
 	}
199 199
 
200
+	/**
201
+	 * @param string $filename
202
+	 * @param string $mimetype
203
+	 */
200 204
 	public function attachFile($filename, $attachedFilename = null, $mimetype = null) {
201 205
 		if(!$attachedFilename) $attachedFilename = basename($filename);
202 206
 		$absoluteFileName = Director::getAbsFile($filename);
@@ -372,6 +376,9 @@  discard block
 block discarded – undo
372 376
 		return $this->ss_template;
373 377
 	}
374 378
 
379
+	/**
380
+	 * @return ViewableData
381
+	 */
375 382
 	protected function templateData() {
376 383
 		if($this->template_data) {
377 384
 			return $this->template_data->customise(array(
@@ -454,6 +461,7 @@  discard block
 block discarded – undo
454 461
 
455 462
 	/**
456 463
 	 * Validates the email address. Returns true of false
464
+	 * @param string $address
457 465
 	 * @return mixed
458 466
 	 */
459 467
 	public static function validEmailAddress($address) {
@@ -676,8 +684,8 @@  discard block
 block discarded – undo
676 684
 	/**
677 685
 	 * Checks for RFC822-valid email format.
678 686
 	 *
679
-	 * @param string $str
680
-	 * @return boolean
687
+	 * @param string $email
688
+	 * @return integer
681 689
 	 *
682 690
 	 * @copyright Cal Henderson <[email protected]>
683 691
 	 * 	This code is licensed under a Creative Commons Attribution-ShareAlike 2.5 License
Please login to merge, or discard this patch.
thirdparty/Zend/Cache/Backend/Xcache.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -140,7 +140,7 @@
 block discarded – undo
140 140
      * @param  string $mode clean mode
141 141
      * @param  array  $tags array of tags
142 142
      * @throws Zend_Cache_Exception
143
-     * @return boolean true if no problem
143
+     * @return boolean|null true if no problem
144 144
      */
145 145
     public function clean($mode = Zend_Cache::CLEANING_MODE_ALL, $tags = array())
146 146
     {
Please login to merge, or discard this patch.