Completed
Pull Request — master (#5771)
by Florian
11:17
created
forms/AssetField.php 1 patch
Doc Comments   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -195,7 +195,7 @@  discard block
 block discarded – undo
195 195
 	/**
196 196
 	 * Determine if the target folder for new uploads in is visible the field UI.
197 197
 	 *
198
-	 * @return boolean
198
+	 * @return boolean|string
199 199
 	 */
200 200
 	public function canPreviewFolder() {
201 201
 		if(!$this->isActive()) {
@@ -264,6 +264,10 @@  discard block
 block discarded – undo
264 264
 		return $this->record;
265 265
 	}
266 266
 
267
+	/**
268
+	 * @param null|DataObject $value
269
+	 * @param DataObject $record
270
+	 */
267 271
 	public function setValue($value, $record = null) {
268 272
 		// Extract value from underlying record
269 273
 		if(empty($value) && $this->getName() && $record instanceof DataObject) {
@@ -370,7 +374,7 @@  discard block
 block discarded – undo
370 374
 	/**
371 375
 	 * Determine if the user has permission to upload.
372 376
 	 *
373
-	 * @return boolean
377
+	 * @return boolean|string
374 378
 	 */
375 379
 	public function canUpload() {
376 380
 		if(!$this->isActive()) {
Please login to merge, or discard this patch.
forms/ConfirmedPasswordField.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
 	/**
145 145
 	 * @param array $properties
146 146
 	 *
147
-	 * @return DBHTMLText
147
+	 * @return string
148 148
 	 */
149 149
 	public function Field($properties = array()) {
150 150
 		Requirements::javascript(FRAMEWORK_DIR . '/thirdparty/jquery/jquery.js');
@@ -494,7 +494,7 @@  discard block
 block discarded – undo
494 494
 	 *
495 495
 	 * @param DataObjectInterface $record
496 496
 	 *
497
-	 * @return boolean
497
+	 * @return false|null
498 498
 	 */
499 499
 	public function saveInto(DataObjectInterface $record) {
500 500
 		if(!$this->isSaveable()) {
Please login to merge, or discard this patch.
forms/Form.php 1 patch
Doc Comments   +8 added lines, -4 removed lines patch added patch discarded remove patch
@@ -507,7 +507,7 @@  discard block
 block discarded – undo
507 507
 	 * The callback can opt out of handling specific responses by returning NULL,
508 508
 	 * in which case the default form behaviour will kick in.
509 509
 	 *
510
-	 * @param $callback
510
+	 * @param Closure $callback
511 511
 	 * @return self
512 512
 	 */
513 513
 	public function setValidationResponseCallback($callback) {
@@ -567,7 +567,7 @@  discard block
 block discarded – undo
567 567
 	/**
568 568
 	 * Fields can have action to, let's check if anyone of the responds to $funcname them
569 569
 	 *
570
-	 * @param SS_List|array $fields
570
+	 * @param FieldList|null $fields
571 571
 	 * @param callable $funcName
572 572
 	 * @return FormField
573 573
 	 */
@@ -706,6 +706,7 @@  discard block
 block discarded – undo
706 706
 	 * Set actions that are exempt from validation
707 707
 	 *
708 708
 	 * @param array
709
+	 * @param string[] $actions
709 710
 	 * @return $this
710 711
 	 */
711 712
 	public function setValidationExemptActions($actions) {
@@ -1104,7 +1105,7 @@  discard block
 block discarded – undo
1104 1105
 	 * If set to false (the default), then the form method is only used to construct the default
1105 1106
 	 * form.
1106 1107
 	 *
1107
-	 * @param $bool boolean
1108
+	 * @param boolean $bool boolean
1108 1109
 	 * @return $this
1109 1110
 	 */
1110 1111
 	public function setStrictFormMethodCheck($bool) {
@@ -1662,7 +1663,7 @@  discard block
 block discarded – undo
1662 1663
 	 * and _form_enctype.  These are the attributes of the form.  These fields
1663 1664
 	 * can be used to send the form to Ajax.
1664 1665
 	 *
1665
-	 * @return DBHTMLText
1666
+	 * @return string
1666 1667
 	 */
1667 1668
 	public function formHtmlContent() {
1668 1669
 		$this->IncludeFormTag = false;
@@ -1923,6 +1924,9 @@  discard block
 block discarded – undo
1923 1924
 
1924 1925
 	protected $form;
1925 1926
 
1927
+	/**
1928
+	 * @param Form $form
1929
+	 */
1926 1930
 	public function __construct($form) {
1927 1931
 		$this->form = $form;
1928 1932
 		parent::__construct();
Please login to merge, or discard this patch.
forms/gridfield/GridFieldPrintButton.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -129,7 +129,7 @@
 block discarded – undo
129 129
 	/**
130 130
 	 *
131 131
 	 * @param GridField $gridField
132
-	 * @return array
132
+	 * @return string[]
133 133
 	 */
134 134
 	public function getActions($gridField) {
135 135
 		return array('addto');
Please login to merge, or discard this patch.
forms/TreeDropdownField.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
 	 *
81 81
 	 * @param string $name the field name
82 82
 	 * @param string $title the field label
83
-	 * @param string|array $sourceObject The object-type to list in the tree. This could
83
+	 * @param string $sourceObject The object-type to list in the tree. This could
84 84
 	 * be one of the following:
85 85
 	 * - A DataObject class name with the {@link Hierarchy} extension.
86 86
 	 * - An array of key/value pairs, like a {@link DropdownField} source. In
@@ -398,7 +398,7 @@  discard block
 block discarded – undo
398 398
 	 * If a filter function has been set, that will be called. And if search text is set,
399 399
 	 * filter on that too. Return true if all applicable conditions are true, false otherwise.
400 400
 	 * @param object $node
401
-	 * @return mixed
401
+	 * @return boolean
402 402
 	 */
403 403
 	public function filterMarking($node) {
404 404
 		if ($this->filterCallback && !call_user_func($this->filterCallback, $node)) return false;
Please login to merge, or discard this patch.
forms/UploadField.php 1 patch
Doc Comments   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -285,7 +285,7 @@  discard block
 block discarded – undo
285 285
 	/**
286 286
 	 * Determine if the target folder for new uploads in is visible the field UI.
287 287
 	 *
288
-	 * @return boolean
288
+	 * @return boolean|string
289 289
 	 */
290 290
 	public function canPreviewFolder() {
291 291
 		if(!$this->isActive()) return false;
@@ -638,7 +638,7 @@  discard block
 block discarded – undo
638 638
 	/**
639 639
 	 * Determine if the user has permission to upload.
640 640
 	 *
641
-	 * @return boolean
641
+	 * @return boolean|string
642 642
 	 */
643 643
 	public function canUpload() {
644 644
 		if(!$this->isActive()) return false;
@@ -662,7 +662,7 @@  discard block
 block discarded – undo
662 662
 	 * Determine if the user has permission to attach existing files
663 663
 	 * By default returns true if the user has the CMS_ACCESS_AssetAdmin permission
664 664
 	 *
665
-	 * @return boolean
665
+	 * @return boolean|string
666 666
 	 */
667 667
 	public function canAttachExisting() {
668 668
 		if(!$this->isActive()) return false;
@@ -1094,7 +1094,7 @@  discard block
 block discarded – undo
1094 1094
 
1095 1095
 	/**
1096 1096
 	 * @param SS_HTTPRequest $request
1097
-	 * @return UploadField_ItemHandler
1097
+	 * @return UploadField_SelectHandler
1098 1098
 	 */
1099 1099
 	public function handleSelect(SS_HTTPRequest $request) {
1100 1100
 		if(!$this->canAttachExisting()) return $this->httpError(403);
@@ -1457,7 +1457,7 @@  discard block
 block discarded – undo
1457 1457
 	 * Action to handle editing of a single file
1458 1458
 	 *
1459 1459
 	 * @param SS_HTTPRequest $request
1460
-	 * @return ViewableData_Customised
1460
+	 * @return DBField
1461 1461
 	 */
1462 1462
 	public function edit(SS_HTTPRequest $request) {
1463 1463
 		// Check form field state
Please login to merge, or discard this patch.
ORM/DataExtension.php 1 patch
Doc Comments   +6 added lines patch added patch discarded remove patch
@@ -78,9 +78,15 @@
 block discarded – undo
78 78
 	public function can($member) {
79 79
 	}
80 80
 
81
+	/**
82
+	 * @param \SilverStripe\Security\Member|null $member
83
+	 */
81 84
 	public function canEdit($member) {
82 85
 	}
83 86
 
87
+	/**
88
+	 * @param \SilverStripe\Security\Member|null $member
89
+	 */
84 90
 	public function canDelete($member) {
85 91
 	}
86 92
 
Please login to merge, or discard this patch.
ORM/DataObject.php 1 patch
Doc Comments   +8 added lines, -7 removed lines patch added patch discarded remove patch
@@ -2197,7 +2197,7 @@  discard block
 block discarded – undo
2197 2197
 	 *
2198 2198
 	 * This is experimental, and is currently only a Postgres-specific enhancement.
2199 2199
 	 *
2200
-	 * @param $class
2200
+	 * @param string $class
2201 2201
 	 * @return array or false
2202 2202
 	 */
2203 2203
 	public function database_extensions($class){
@@ -2677,6 +2677,7 @@  discard block
 block discarded – undo
2677 2677
 
2678 2678
 	/**
2679 2679
 	 * {@inheritdoc}
2680
+	 * @param string $field
2680 2681
 	 */
2681 2682
 	public function castingHelper($field) {
2682 2683
 		if ($fieldSpec = $this->db($field)) {
@@ -2880,7 +2881,7 @@  discard block
 block discarded – undo
2880 2881
 
2881 2882
 	/**
2882 2883
 	 * @param Member $member
2883
-	 * @return boolean
2884
+	 * @return boolean|string
2884 2885
 	 */
2885 2886
 	public function canView($member = null) {
2886 2887
 		$extended = $this->extendedCan(__FUNCTION__, $member);
@@ -2892,7 +2893,7 @@  discard block
 block discarded – undo
2892 2893
 
2893 2894
 	/**
2894 2895
 	 * @param Member $member
2895
-	 * @return boolean
2896
+	 * @return boolean|string
2896 2897
 	 */
2897 2898
 	public function canEdit($member = null) {
2898 2899
 		$extended = $this->extendedCan(__FUNCTION__, $member);
@@ -2904,7 +2905,7 @@  discard block
 block discarded – undo
2904 2905
 
2905 2906
 	/**
2906 2907
 	 * @param Member $member
2907
-	 * @return boolean
2908
+	 * @return boolean|string
2908 2909
 	 */
2909 2910
 	public function canDelete($member = null) {
2910 2911
 		$extended = $this->extendedCan(__FUNCTION__, $member);
@@ -2918,7 +2919,7 @@  discard block
 block discarded – undo
2918 2919
 	 * @param Member $member
2919 2920
 	 * @param array $context Additional context-specific data which might
2920 2921
 	 * affect whether (or where) this object could be created.
2921
-	 * @return boolean
2922
+	 * @return boolean|string
2922 2923
 	 */
2923 2924
 	public function canCreate($member = null, $context = array()) {
2924 2925
 		$extended = $this->extendedCan(__FUNCTION__, $member, $context);
@@ -3018,7 +3019,7 @@  discard block
 block discarded – undo
3018 3019
 	 * Traverses to a field referenced by relationships between data objects, returning the value
3019 3020
 	 * The path to the related field is specified with dot separated syntax (eg: Parent.Child.Child.FieldName)
3020 3021
 	 *
3021
-	 * @param $fieldName string
3022
+	 * @param string $fieldName string
3022 3023
 	 * @return string | null - will return null on a missing value
3023 3024
 	 */
3024 3025
 	public function relField($fieldName) {
@@ -3088,7 +3089,7 @@  discard block
 block discarded – undo
3088 3089
 	 * @param string $callerClass The class of objects to be returned
3089 3090
 	 * @param string|array $filter A filter to be inserted into the WHERE clause.
3090 3091
 	 * Supports parameterised queries. See SQLSelect::addWhere() for syntax examples.
3091
-	 * @param string|array $sort A sort expression to be inserted into the ORDER
3092
+	 * @param string $sort A sort expression to be inserted into the ORDER
3092 3093
 	 * BY clause.  If omitted, self::$default_sort will be used.
3093 3094
 	 * @param string $join Deprecated 3.0 Join clause. Use leftJoin($table, $joinClause) instead.
3094 3095
 	 * @param string|array $limit A limit expression to be inserted into the LIMIT clause.
Please login to merge, or discard this patch.
ORM/Versioning/ChangeSetItem.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
 	 * Find version of this object in the given stage
128 128
 	 *
129 129
 	 * @param string $stage
130
-	 * @return Versioned|DataObject
130
+	 * @return DataObject|null
131 131
 	 */
132 132
 	protected function getObjectInStage($stage) {
133 133
 		return Versioned::get_by_stage($this->ObjectClass, $stage)->byID($this->ObjectID);
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
 	/**
137 137
 	 * Find latest version of this object
138 138
 	 *
139
-	 * @return Versioned|DataObject
139
+	 * @return DataObject|null
140 140
 	 */
141 141
 	protected function getObjectLatestVersion() {
142 142
 		return Versioned::get_latest_version($this->ObjectClass, $this->ObjectID);
Please login to merge, or discard this patch.