@@ -52,6 +52,9 @@ |
||
52 | 52 | return 0; |
53 | 53 | } |
54 | 54 | |
55 | + /** |
|
56 | + * @param integer $value |
|
57 | + */ |
|
55 | 58 | public function prepValueForDB($value) { |
56 | 59 | if($value === true) { |
57 | 60 | return 1; |
@@ -765,7 +765,7 @@ discard block |
||
765 | 765 | * Extend permissions to include additional security for objects that are not published to live. |
766 | 766 | * |
767 | 767 | * @param Member $member |
768 | - * @return bool|null |
|
768 | + * @return false|null |
|
769 | 769 | */ |
770 | 770 | public function canView($member = null) { |
771 | 771 | // Invoke default version-gnostic canView |
@@ -839,7 +839,7 @@ discard block |
||
839 | 839 | * |
840 | 840 | * @param string $stage |
841 | 841 | * @param Member $member |
842 | - * @return bool |
|
842 | + * @return boolean|string |
|
843 | 843 | */ |
844 | 844 | public function canViewStage($stage = 'Live', $member = null) { |
845 | 845 | $oldMode = Versioned::get_reading_mode(); |
@@ -905,7 +905,7 @@ discard block |
||
905 | 905 | /** |
906 | 906 | * Is the latest version of the object published? |
907 | 907 | * |
908 | - * @return bool |
|
908 | + * @return string |
|
909 | 909 | */ |
910 | 910 | public function latestPublished() { |
911 | 911 | // Get the root data object class - this will have the version field |
@@ -1029,7 +1029,7 @@ discard block |
||
1029 | 1029 | * @param string $limit |
1030 | 1030 | * @param string $join Deprecated, use leftJoin($table, $joinClause) instead |
1031 | 1031 | * @param string $having |
1032 | - * @return DataList |
|
1032 | + * @return ArrayList |
|
1033 | 1033 | */ |
1034 | 1034 | public function Versions($filter = "", $sort = "", $limit = "", $join = "", $having = "") { |
1035 | 1035 | return $this->allVersions($filter, $sort, $limit, $join, $having); |
@@ -1043,7 +1043,7 @@ discard block |
||
1043 | 1043 | * @param string $limit |
1044 | 1044 | * @param string $join Deprecated, use leftJoin($table, $joinClause) instead |
1045 | 1045 | * @param string $having |
1046 | - * @return DataList |
|
1046 | + * @return ArrayList |
|
1047 | 1047 | */ |
1048 | 1048 | public function allVersions($filter = "", $sort = "", $limit = "", $join = "", $having = "") { |
1049 | 1049 | // Make sure the table names are not postfixed (e.g. _Live) |
@@ -1361,7 +1361,7 @@ discard block |
||
1361 | 1361 | * @param string $filter A filter to be inserted into the WHERE clause. |
1362 | 1362 | * @param string $sort A sort expression to be inserted into the ORDER BY clause. |
1363 | 1363 | * @param string $join Deprecated, use leftJoin($table, $joinClause) instead |
1364 | - * @param string|int $limit A limit on the number of records returned from the database. |
|
1364 | + * @param integer $limit A limit on the number of records returned from the database. |
|
1365 | 1365 | * @param string $containerClass The container class for the result set (default is DataList) |
1366 | 1366 | * |
1367 | 1367 | * @return DataList A modified DataList designated to the specified stage |
@@ -496,7 +496,7 @@ discard block |
||
496 | 496 | * Combine the given forms into a formset with a tabbed interface |
497 | 497 | * |
498 | 498 | * @param array $forms List of LoginForm instances |
499 | - * @return string |
|
499 | + * @return HTMLText |
|
500 | 500 | */ |
501 | 501 | protected function generateLoginFormSet($forms) { |
502 | 502 | $viewData = new ArrayData(array( |
@@ -676,7 +676,6 @@ discard block |
||
676 | 676 | * - t: plaintext token |
677 | 677 | * |
678 | 678 | * @param Member $member Member object associated with this link. |
679 | - * @param string $autoLoginHash The auto login token. |
|
680 | 679 | */ |
681 | 680 | public static function getPasswordResetLink($member, $autologinToken) { |
682 | 681 | $autologinToken = urldecode($autologinToken); |
@@ -767,7 +766,7 @@ discard block |
||
767 | 766 | /** |
768 | 767 | * Factory method for the lost password form |
769 | 768 | * |
770 | - * @return Form Returns the lost password form |
|
769 | + * @return Security Returns the lost password form |
|
771 | 770 | */ |
772 | 771 | public function ChangePasswordForm() { |
773 | 772 | return Object::create('ChangePasswordForm', $this, 'ChangePasswordForm'); |
@@ -951,7 +950,7 @@ discard block |
||
951 | 950 | * @deprecated 4.0 Use the "Security.password_encryption_algorithm" config setting instead |
952 | 951 | * @param string $algorithm One of the available password encryption |
953 | 952 | * algorithms determined by {@link Security::get_encryption_algorithms()} |
954 | - * @return bool Returns TRUE if the passed algorithm was valid, otherwise FALSE. |
|
953 | + * @return boolean|null Returns TRUE if the passed algorithm was valid, otherwise FALSE. |
|
955 | 954 | */ |
956 | 955 | public static function set_password_encryption_algorithm($algorithm) { |
957 | 956 | Deprecation::notice('4.0', 'Use the "Security.password_encryption_algorithm" config setting instead'); |
@@ -1106,7 +1105,7 @@ discard block |
||
1106 | 1105 | /** |
1107 | 1106 | * Set to true to ignore access to disallowed actions, rather than returning permission failure |
1108 | 1107 | * Note that this is just a flag that other code needs to check with Security::ignore_disallowed_actions() |
1109 | - * @param $flag True or false |
|
1108 | + * @param boolean $flag True or false |
|
1110 | 1109 | */ |
1111 | 1110 | public static function set_ignore_disallowed_actions($flag) { |
1112 | 1111 | self::$ignore_disallowed_actions = $flag; |
@@ -51,6 +51,9 @@ discard block |
||
51 | 51 | ); |
52 | 52 | } |
53 | 53 | |
54 | + /** |
|
55 | + * @param Requirements_Backend $backend |
|
56 | + */ |
|
54 | 57 | protected function setupCombinedRequirements($backend) { |
55 | 58 | $basePath = $this->getCurrentRelativePath(); |
56 | 59 | |
@@ -76,6 +79,9 @@ discard block |
||
76 | 79 | ); |
77 | 80 | } |
78 | 81 | |
82 | + /** |
|
83 | + * @param Requirements_Backend $backend |
|
84 | + */ |
|
79 | 85 | protected function setupCombinedNonrequiredRequirements($backend) { |
80 | 86 | $basePath = $this->getCurrentRelativePath(); |
81 | 87 | |
@@ -482,6 +488,10 @@ discard block |
||
482 | 488 | $this->assertContains('var myvar="<head></head>";', $backend->includeInHTML(false, $template)); |
483 | 489 | } |
484 | 490 | |
491 | + /** |
|
492 | + * @param Requirements_Backend $backend |
|
493 | + * @param string $type |
|
494 | + */ |
|
485 | 495 | public function assertFileIncluded($backend, $type, $files) { |
486 | 496 | $type = strtolower($type); |
487 | 497 | switch (strtolower($type)) { |
@@ -526,6 +536,10 @@ discard block |
||
526 | 536 | } |
527 | 537 | } |
528 | 538 | |
539 | + /** |
|
540 | + * @param Requirements_Backend $backend |
|
541 | + * @param string $type |
|
542 | + */ |
|
529 | 543 | public function assertFileNotIncluded($backend, $type, $files) { |
530 | 544 | $type = strtolower($type); |
531 | 545 | switch ($type) { |
@@ -23,6 +23,7 @@ discard block |
||
23 | 23 | * |
24 | 24 | * By default, this is set to true so that it's clearer what's happening, but the predefined |
25 | 25 | * {@link GridFieldConfig} subclasses set this to false for flexibility. |
26 | + * @param boolean $throwExceptionOnBadDataType |
|
26 | 27 | */ |
27 | 28 | public function setThrowExceptionOnBadDataType($throwExceptionOnBadDataType) { |
28 | 29 | $this->throwExceptionOnBadDataType = $throwExceptionOnBadDataType; |
@@ -38,6 +39,7 @@ discard block |
||
38 | 39 | /** |
39 | 40 | * Check that this dataList is of the right data type. |
40 | 41 | * Returns false if it's a bad data type, and if appropriate, throws an exception. |
42 | + * @param SS_List $dataList |
|
41 | 43 | */ |
42 | 44 | protected function checkDataType($dataList) { |
43 | 45 | if($dataList instanceof SS_Filterable) { |
@@ -551,7 +551,7 @@ discard block |
||
551 | 551 | * The destinationObject must be written to the database already and have an ID. Writing is performed |
552 | 552 | * automatically when adding the new relations. |
553 | 553 | * |
554 | - * @param $sourceObject the source object to duplicate from |
|
554 | + * @param DataObject $sourceObject the source object to duplicate from |
|
555 | 555 | * @param $destinationObject the destination object to populate with the duplicated relations |
556 | 556 | * @return DataObject with the new many_many relations copied in |
557 | 557 | */ |
@@ -958,6 +958,7 @@ discard block |
||
958 | 958 | * @param $includeRelations Boolean Merge any existing relations (optional) |
959 | 959 | * @param $overwriteWithEmpty Boolean Overwrite existing left values with empty right values. |
960 | 960 | * Only applicable with $priority='right'. (optional) |
961 | + * @param DataObject|null $rightObj |
|
961 | 962 | * @return Boolean |
962 | 963 | */ |
963 | 964 | public function merge($rightObj, $priority = 'right', $includeRelations = true, $overwriteWithEmpty = false) { |
@@ -1581,10 +1582,10 @@ discard block |
||
1581 | 1582 | * |
1582 | 1583 | * @param string $componentName Name of the component |
1583 | 1584 | * @param string|null $filter Deprecated. A filter to be inserted into the WHERE clause |
1584 | - * @param string|null|array $sort Deprecated. A sort expression to be inserted into the ORDER BY clause. If omitted, |
|
1585 | + * @param string $sort Deprecated. A sort expression to be inserted into the ORDER BY clause. If omitted, |
|
1585 | 1586 | * the static field $default_sort on the component class will be used. |
1586 | 1587 | * @param string $join Deprecated, use leftJoin($table, $joinClause) instead |
1587 | - * @param string|null|array $limit Deprecated. A limit expression to be inserted into the LIMIT clause |
|
1588 | + * @param string $limit Deprecated. A limit expression to be inserted into the LIMIT clause |
|
1588 | 1589 | * |
1589 | 1590 | * @return HasManyList The components of the one-to-many relationship. |
1590 | 1591 | */ |
@@ -2210,6 +2211,7 @@ discard block |
||
2210 | 2211 | * |
2211 | 2212 | * This is experimental, and is currently only a Postgres-specific enhancement. |
2212 | 2213 | * |
2214 | + * @param string $class |
|
2213 | 2215 | * @return array or false |
2214 | 2216 | */ |
2215 | 2217 | public function database_extensions($class){ |
@@ -2677,7 +2679,7 @@ discard block |
||
2677 | 2679 | * can be saved into the Image table. |
2678 | 2680 | * |
2679 | 2681 | * @param string $fieldName Name of the field |
2680 | - * @param mixed $value New field value |
|
2682 | + * @param mixed $val New field value |
|
2681 | 2683 | * @return DataObject $this |
2682 | 2684 | */ |
2683 | 2685 | public function setCastedField($fieldName, $val) { |
@@ -2697,6 +2699,7 @@ discard block |
||
2697 | 2699 | |
2698 | 2700 | /** |
2699 | 2701 | * {@inheritdoc} |
2702 | + * @param string $field |
|
2700 | 2703 | */ |
2701 | 2704 | public function castingHelper($field) { |
2702 | 2705 | if ($fieldSpec = $this->db($field)) { |
@@ -3061,6 +3064,7 @@ discard block |
||
3061 | 3064 | * The path to the related field is specified with dot separated syntax (eg: Parent.Child.Child.FieldName) |
3062 | 3065 | * |
3063 | 3066 | * @param $fieldPath string |
3067 | + * @param string $fieldName |
|
3064 | 3068 | * @return string | null - will return null on a missing value |
3065 | 3069 | */ |
3066 | 3070 | public function relField($fieldName) { |
@@ -3129,7 +3133,7 @@ discard block |
||
3129 | 3133 | * @param string $callerClass The class of objects to be returned |
3130 | 3134 | * @param string|array $filter A filter to be inserted into the WHERE clause. |
3131 | 3135 | * Supports parameterised queries. See SQLQuery::addWhere() for syntax examples. |
3132 | - * @param string|array $sort A sort expression to be inserted into the ORDER |
|
3136 | + * @param string $sort A sort expression to be inserted into the ORDER |
|
3133 | 3137 | * BY clause. If omitted, self::$default_sort will be used. |
3134 | 3138 | * @param string $join Deprecated 3.0 Join clause. Use leftJoin($table, $joinClause) instead. |
3135 | 3139 | * @param string|array $limit A limit expression to be inserted into the LIMIT clause. |
@@ -3180,6 +3184,7 @@ discard block |
||
3180 | 3184 | |
3181 | 3185 | /** |
3182 | 3186 | * @deprecated |
3187 | + * @param string $class |
|
3183 | 3188 | */ |
3184 | 3189 | public function Aggregate($class = null) { |
3185 | 3190 | Deprecation::notice('4.0', 'Call aggregate methods on a DataList directly instead. In templates' |
@@ -3201,6 +3206,7 @@ discard block |
||
3201 | 3206 | |
3202 | 3207 | /** |
3203 | 3208 | * @deprecated |
3209 | + * @param string $relationship |
|
3204 | 3210 | */ |
3205 | 3211 | public function RelationshipAggregate($relationship) { |
3206 | 3212 | Deprecation::notice('4.0', 'Call aggregate methods on a relationship directly instead.'); |
@@ -3369,6 +3375,7 @@ discard block |
||
3369 | 3375 | |
3370 | 3376 | /** |
3371 | 3377 | * @see $sourceQueryParams |
3378 | + * @param string $key |
|
3372 | 3379 | * @return Mixed |
3373 | 3380 | */ |
3374 | 3381 | public function getSourceQueryParam($key) { |
@@ -145,7 +145,7 @@ discard block |
||
145 | 145 | * @param Form $form Optional: If passed, better error messages can be |
146 | 146 | * produced by using |
147 | 147 | * {@link Form::sessionMessage()} |
148 | - * @return bool|Member Returns FALSE if authentication fails, otherwise |
|
148 | + * @return Member|null Returns FALSE if authentication fails, otherwise |
|
149 | 149 | * the member object |
150 | 150 | * @see Security::setDefaultAdmin() |
151 | 151 | */ |
@@ -186,7 +186,7 @@ discard block |
||
186 | 186 | /** |
187 | 187 | * Method that creates the login form for this authentication method |
188 | 188 | * |
189 | - * @param Controller The parent controller, necessary to create the |
|
189 | + * @param Controller Controller parent controller, necessary to create the |
|
190 | 190 | * appropriate form action tag |
191 | 191 | * @return MemberLoginForm Returns the login form to use with this authentication |
192 | 192 | * method |
@@ -335,8 +335,8 @@ |
||
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 | */ |
@@ -144,13 +144,13 @@ |
||
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 |