Completed
Pull Request — master (#4551)
by Sam
10:37
created
forms/Form.php 1 patch
Doc Comments   +11 added lines, -5 removed lines patch added patch discarded remove patch
@@ -524,7 +524,7 @@  discard block
 block discarded – undo
524 524
 	/**
525 525
 	 * Fields can have action to, let's check if anyone of the responds to $funcname them
526 526
 	 *
527
-	 * @param SS_List|array $fields
527
+	 * @param FieldList|null $fields
528 528
 	 * @param callable $funcName
529 529
 	 * @return FormField
530 530
 	 */
@@ -663,6 +663,7 @@  discard block
 block discarded – undo
663 663
 	 * Set actions that are exempt from validation
664 664
 	 * 
665 665
 	 * @param array
666
+	 * @param string[] $actions
666 667
 	 */
667 668
 	public function setValidationExemptActions($actions) {
668 669
 		$this->validationExemptActions = $actions;
@@ -802,6 +803,7 @@  discard block
 block discarded – undo
802 803
 	}
803 804
 
804 805
 	/**
806
+	 * @param string $name
805 807
 	 * @return string $name
806 808
 	 */
807 809
 	public function getAttribute($name) {
@@ -836,6 +838,7 @@  discard block
 block discarded – undo
836 838
 	 *
837 839
 	 * @param array Custom attributes to process. Falls back to {@link getAttributes()}.
838 840
 	 * If at least one argument is passed as a string, all arguments act as excludes by name.
841
+	 * @param string $attrs
839 842
 	 *
840 843
 	 * @return string HTML attributes, ready for insertion into an HTML tag
841 844
 	 */
@@ -1043,7 +1046,7 @@  discard block
 block discarded – undo
1043 1046
 	 * If set to false (the default), then the form method is only used to construct the default
1044 1047
 	 * form.
1045 1048
 	 *
1046
-	 * @param $bool boolean
1049
+	 * @param boolean $bool boolean
1047 1050
 	 * @return $this
1048 1051
 	 */
1049 1052
 	public function setStrictFormMethodCheck($bool) {
@@ -1546,7 +1549,7 @@  discard block
 block discarded – undo
1546 1549
 	 * This is returned when you access a form as $FormObject rather
1547 1550
 	 * than <% with FormObject %>
1548 1551
 	 *
1549
-	 * @return HTML
1552
+	 * @return DBField
1550 1553
 	 */
1551 1554
 	public function forTemplate() {
1552 1555
 		$return = $this->renderWith(array_merge(
@@ -1566,7 +1569,7 @@  discard block
 block discarded – undo
1566 1569
 	 * It triggers slightly different behaviour, such as disabling the rewriting
1567 1570
 	 * of # links.
1568 1571
 	 *
1569
-	 * @return HTML
1572
+	 * @return DBField
1570 1573
 	 */
1571 1574
 	public function forAjaxTemplate() {
1572 1575
 		$view = new SSViewer(array(
@@ -1589,7 +1592,7 @@  discard block
 block discarded – undo
1589 1592
 	 * and _form_enctype.  These are the attributes of the form.  These fields
1590 1593
 	 * can be used to send the form to Ajax.
1591 1594
 	 *
1592
-	 * @return HTML
1595
+	 * @return string
1593 1596
 	 */
1594 1597
 	public function formHtmlContent() {
1595 1598
 		$this->IncludeFormTag = false;
@@ -1850,6 +1853,9 @@  discard block
 block discarded – undo
1850 1853
 
1851 1854
 	protected $form;
1852 1855
 
1856
+	/**
1857
+	 * @param Form $form
1858
+	 */
1853 1859
 	public function __construct($form) {
1854 1860
 		$this->form = $form;
1855 1861
 		parent::__construct();
Please login to merge, or discard this patch.
forms/gridfield/GridField.php 1 patch
Doc Comments   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -199,7 +199,7 @@  discard block
 block discarded – undo
199 199
 	 *
200 200
 	 * @todo refactor this into GridFieldComponent
201 201
 	 *
202
-	 * @param mixed $value
202
+	 * @param string $value
203 203
 	 * @param string|array $castingDefinition
204 204
 	 *
205 205
 	 * @return mixed
@@ -286,7 +286,7 @@  discard block
 block discarded – undo
286 286
 	 *
287 287
 	 * @param array $properties
288 288
 	 *
289
-	 * @return HTMLText
289
+	 * @return DBField
290 290
 	 */
291 291
 	public function FieldHolder($properties = array()) {
292 292
 		Requirements::css(THIRDPARTY_DIR . '/jquery-ui-themes/smoothness/jquery-ui.css');
@@ -571,7 +571,7 @@  discard block
 block discarded – undo
571 571
 	 * @param int $index
572 572
 	 * @param DataObject $record
573 573
 	 *
574
-	 * @return array
574
+	 * @return string[]
575 575
 	 */
576 576
 	protected function newRowClasses($total, $index, $record) {
577 577
 		$classes = array('ss-gridfield-item');
@@ -596,7 +596,7 @@  discard block
 block discarded – undo
596 596
 	/**
597 597
 	 * @param array $properties
598 598
 	 *
599
-	 * @return HTMLText
599
+	 * @return DBField
600 600
 	 */
601 601
 	public function Field($properties = array()) {
602 602
 		return $this->FieldHolder($properties);
Please login to merge, or discard this patch.
forms/gridfield/GridFieldEditButton.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
 	 * Which columns are handled by this component
56 56
 	 *
57 57
 	 * @param GridField $gridField
58
-	 * @return array
58
+	 * @return string[]
59 59
 	 */
60 60
 	public function getColumnsHandled($gridField) {
61 61
 		return array('Actions');
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
 	 * @param DataObject $record
77 77
 	 * @param string $columnName
78 78
 	 *
79
-	 * @return string - the HTML for the column
79
+	 * @return DBField - the HTML for the column
80 80
 	 */
81 81
 	public function getColumnContent($gridField, $record, $columnName) {
82 82
 		// No permission checks, handled through GridFieldDetailForm,
Please login to merge, or discard this patch.
forms/InlineFormAction.php 1 patch
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
 
18 18
 	/**
19 19
 	 * Create a new action button.
20
-	 * @param action The method to call when the button is clicked
20
+	 * @param action string method to call when the button is clicked
21 21
 	 * @param title The label on the button
22 22
 	 * @param extraClass A CSS class to apply to the button in addition to 'action'
23 23
 	 */
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
 
33 33
 	/**
34 34
 	 * @param array $properties
35
-	 * @return HTMLText
35
+	 * @return DBField
36 36
 	 */
37 37
 	public function Field($properties = array()) {
38 38
 		if($this->includeDefaultJS) {
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
 
79 79
 	/**
80 80
 	 * @param array $properties
81
-	 * @return HTMLText
81
+	 * @return DBField
82 82
 	 */
83 83
 	public function Field($properties = array()) {
84 84
 		return DBField::create_field('HTMLText',
Please login to merge, or discard this patch.
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 DBField
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.
forms/UploadField.php 1 patch
Doc Comments   +2 added lines, -3 removed lines patch added patch discarded remove patch
@@ -211,7 +211,6 @@  discard block
 block discarded – undo
211 211
 	 * @param string $title The field label.
212 212
 	 * @param SS_List $items If no items are defined, the field will try to auto-detect an existing relation on
213 213
 	 *                       @link $record}, with the same name as the field name.
214
-	 * @param Form $form Reference to the container form
215 214
 	 */
216 215
 	public function __construct($name, $title = null, SS_List $items = null) {
217 216
 
@@ -1078,7 +1077,7 @@  discard block
 block discarded – undo
1078 1077
 
1079 1078
 	/**
1080 1079
 	 * @param SS_HTTPRequest $request
1081
-	 * @return UploadField_ItemHandler
1080
+	 * @return UploadField_SelectHandler
1082 1081
 	 */
1083 1082
 	public function handleSelect(SS_HTTPRequest $request) {
1084 1083
 		if(!$this->canAttachExisting()) return $this->httpError(403);
@@ -1434,7 +1433,7 @@  discard block
 block discarded – undo
1434 1433
 	 * Action to handle editing of a single file
1435 1434
 	 *
1436 1435
 	 * @param SS_HTTPRequest $request
1437
-	 * @return ViewableData_Customised
1436
+	 * @return DBField
1438 1437
 	 */
1439 1438
 	public function edit(SS_HTTPRequest $request) {
1440 1439
 		// Check form field state
Please login to merge, or discard this patch.
model/fieldtypes/Datetime.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -108,7 +108,7 @@
 block discarded – undo
108 108
 	 * Return a date and time formatted as per a CMS user's settings.
109 109
 	 *
110 110
 	 * @param Member $member
111
-	 * @return boolean | string A time and date pair formatted as per user-defined settings.
111
+	 * @return false|string | string A time and date pair formatted as per user-defined settings.
112 112
 	 */
113 113
 	public function FormatFromSettings($member = null) {
114 114
 		require_once 'Zend/Date.php';
Please login to merge, or discard this patch.
security/PermissionCheckboxSetField.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -76,7 +76,7 @@
 block discarded – undo
76 76
 
77 77
 	/**
78 78
 	 * @param array $properties
79
-	 * @return HTMLText
79
+	 * @return DBField
80 80
 	 */
81 81
 	public function Field($properties = array()) {
82 82
 		Requirements::css(FRAMEWORK_DIR . '/css/CheckboxSetField.css');
Please login to merge, or discard this patch.
security/Security.php 1 patch
Doc Comments   +5 added lines, -6 removed lines patch added patch discarded remove patch
@@ -465,7 +465,7 @@  discard block
 block discarded – undo
465 465
 	 * Combine the given forms into a formset with a tabbed interface
466 466
 	 *
467 467
 	 * @param array $forms List of LoginForm instances
468
-	 * @return string
468
+	 * @return DBField
469 469
 	 */
470 470
 	protected function generateLoginFormSet($forms) {
471 471
 		$viewData = new ArrayData(array(
@@ -645,7 +645,6 @@  discard block
 block discarded – undo
645 645
 	 * - t: plaintext token
646 646
 	 *
647 647
 	 * @param Member $member Member object associated with this link.
648
-	 * @param string $autoLoginHash The auto login token.
649 648
 	 */
650 649
 	public static function getPasswordResetLink($member, $autologinToken) {
651 650
 		$autologinToken = urldecode($autologinToken);
@@ -736,7 +735,7 @@  discard block
 block discarded – undo
736 735
 	/**
737 736
 	 * Factory method for the lost password form
738 737
 	 *
739
-	 * @return Form Returns the lost password form
738
+	 * @return Security Returns the lost password form
740 739
 	 */
741 740
 	public function ChangePasswordForm() {
742 741
 		return Object::create('ChangePasswordForm', $this, 'ChangePasswordForm');
@@ -746,7 +745,7 @@  discard block
 block discarded – undo
746 745
 	 * Gets the template for an include used for security.
747 746
 	 * For use in any subclass.
748 747
 	 *
749
-	 * @return string|array Returns the template(s) for rendering
748
+	 * @return string[] Returns the template(s) for rendering
750 749
 	 */
751 750
 	public function getIncludeTemplate($name) {
752 751
 		return array('Security_' . $name);
@@ -920,7 +919,7 @@  discard block
 block discarded – undo
920 919
 	 * @deprecated 4.0 Use the "Security.password_encryption_algorithm" config setting instead
921 920
 	 * @param string $algorithm One of the available password encryption
922 921
 	 *  algorithms determined by {@link Security::get_encryption_algorithms()}
923
-	 * @return bool Returns TRUE if the passed algorithm was valid, otherwise FALSE.
922
+	 * @return boolean|null Returns TRUE if the passed algorithm was valid, otherwise FALSE.
924 923
 	 */
925 924
 	public static function set_password_encryption_algorithm($algorithm) {
926 925
 		Deprecation::notice('4.0', 'Use the "Security.password_encryption_algorithm" config setting instead');
@@ -1075,7 +1074,7 @@  discard block
 block discarded – undo
1075 1074
 	/**
1076 1075
 	 * Set to true to ignore access to disallowed actions, rather than returning permission failure
1077 1076
 	 * Note that this is just a flag that other code needs to check with Security::ignore_disallowed_actions()
1078
-	 * @param $flag True or false
1077
+	 * @param boolean $flag True or false
1079 1078
 	 */
1080 1079
 	public static function set_ignore_disallowed_actions($flag) {
1081 1080
 		self::$ignore_disallowed_actions = $flag;
Please login to merge, or discard this patch.