@@ -2197,7 +2197,7 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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. |
@@ -127,7 +127,7 @@ discard block |
||
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 |
||
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); |
@@ -1073,7 +1073,7 @@ discard block |
||
1073 | 1073 | /** |
1074 | 1074 | * Find objects in the given relationships, merging them into the given list |
1075 | 1075 | * |
1076 | - * @param array $source Config property to extract relationships from |
|
1076 | + * @param string $source Config property to extract relationships from |
|
1077 | 1077 | * @param bool $recursive True if recursive |
1078 | 1078 | * @param ArrayList $list Optional list to add items to |
1079 | 1079 | * @return ArrayList The list |
@@ -1193,7 +1193,7 @@ discard block |
||
1193 | 1193 | /** |
1194 | 1194 | * Check if the current user can delete this record from live |
1195 | 1195 | * |
1196 | - * @param null $member |
|
1196 | + * @param Member|null $member |
|
1197 | 1197 | * @return mixed |
1198 | 1198 | */ |
1199 | 1199 | public function canUnpublish($member = null) { |
@@ -1303,7 +1303,7 @@ discard block |
||
1303 | 1303 | * Extend permissions to include additional security for objects that are not published to live. |
1304 | 1304 | * |
1305 | 1305 | * @param Member $member |
1306 | - * @return bool|null |
|
1306 | + * @return false|null |
|
1307 | 1307 | */ |
1308 | 1308 | public function canView($member = null) { |
1309 | 1309 | // Invoke default version-gnostic canView |
@@ -1378,7 +1378,7 @@ discard block |
||
1378 | 1378 | * |
1379 | 1379 | * @param string $stage |
1380 | 1380 | * @param Member $member |
1381 | - * @return bool |
|
1381 | + * @return boolean|string |
|
1382 | 1382 | */ |
1383 | 1383 | public function canViewStage($stage = 'Live', $member = null) { |
1384 | 1384 | $oldMode = Versioned::get_reading_mode(); |
@@ -1443,7 +1443,7 @@ discard block |
||
1443 | 1443 | /** |
1444 | 1444 | * Get the latest published DataObject. |
1445 | 1445 | * |
1446 | - * @return DataObject |
|
1446 | + * @return string |
|
1447 | 1447 | */ |
1448 | 1448 | public function latestPublished() { |
1449 | 1449 | // Get the root data object class - this will have the version field |
@@ -2435,7 +2435,7 @@ discard block |
||
2435 | 2435 | /** |
2436 | 2436 | * Returns an array of possible stages. |
2437 | 2437 | * |
2438 | - * @return array |
|
2438 | + * @return string[] |
|
2439 | 2439 | */ |
2440 | 2440 | public function getVersionedStages() { |
2441 | 2441 | if($this->hasStages()) { |
@@ -128,7 +128,7 @@ discard block |
||
128 | 128 | * Remove a previously registered authenticator |
129 | 129 | * |
130 | 130 | * @param string $authenticator Name of the authenticator class to register |
131 | - * @return bool Returns TRUE on success, FALSE otherwise. |
|
131 | + * @return boolean|null Returns TRUE on success, FALSE otherwise. |
|
132 | 132 | */ |
133 | 133 | public static function unregister_authenticator($authenticator) { |
134 | 134 | if(call_user_func(array($authenticator, 'on_unregister')) === true) { |
@@ -171,6 +171,7 @@ discard block |
||
171 | 171 | * Set a default authenticator (shows first in tabs) |
172 | 172 | * |
173 | 173 | * @param string |
174 | + * @param string $authenticator |
|
174 | 175 | */ |
175 | 176 | public static function set_default_authenticator($authenticator) { |
176 | 177 | self::$default_authenticator = $authenticator; |
@@ -22,7 +22,7 @@ |
||
22 | 22 | /** |
23 | 23 | * Constructor |
24 | 24 | * |
25 | - * @param Controller $controller The parent controller, necessary to |
|
25 | + * @param \Controller|null $controller The parent controller, necessary to |
|
26 | 26 | * create the appropriate form action tag. |
27 | 27 | * @param string $name The method on the controller that will return this |
28 | 28 | * form object. |
@@ -331,6 +331,7 @@ |
||
331 | 331 | * Overloaded to ensure the code is always descent. |
332 | 332 | * |
333 | 333 | * @param string |
334 | + * @param string $val |
|
334 | 335 | */ |
335 | 336 | public function setCode($val){ |
336 | 337 | $this->setField("Code", Convert::raw2url($val)); |
@@ -1563,7 +1563,7 @@ discard block |
||
1563 | 1563 | * This is likely to be customized for social sites etc. with a looser permission model. |
1564 | 1564 | * |
1565 | 1565 | * @param Member $member |
1566 | - * @return bool |
|
1566 | + * @return boolean|string |
|
1567 | 1567 | */ |
1568 | 1568 | public function canView($member = null) { |
1569 | 1569 | //get member |
@@ -1593,7 +1593,7 @@ discard block |
||
1593 | 1593 | * Otherwise they'll need ADMIN or CMS_ACCESS_SecurityAdmin permissions |
1594 | 1594 | * |
1595 | 1595 | * @param Member $member |
1596 | - * @return bool |
|
1596 | + * @return boolean|string |
|
1597 | 1597 | */ |
1598 | 1598 | public function canEdit($member = null) { |
1599 | 1599 | //get member |
@@ -1627,7 +1627,7 @@ discard block |
||
1627 | 1627 | * Otherwise they'll need ADMIN or CMS_ACCESS_SecurityAdmin permissions |
1628 | 1628 | * |
1629 | 1629 | * @param Member $member |
1630 | - * @return bool |
|
1630 | + * @return boolean|string |
|
1631 | 1631 | */ |
1632 | 1632 | public function canDelete($member = null) { |
1633 | 1633 | if(!($member instanceof Member)) { |
@@ -147,7 +147,7 @@ |
||
147 | 147 | * @param Form $form Optional: If passed, better error messages can be |
148 | 148 | * produced by using |
149 | 149 | * {@link Form::sessionMessage()} |
150 | - * @return bool|Member Returns FALSE if authentication fails, otherwise |
|
150 | + * @return Member|null Returns FALSE if authentication fails, otherwise |
|
151 | 151 | * the member object |
152 | 152 | * @see Security::setDefaultAdmin() |
153 | 153 | */ |
@@ -28,6 +28,7 @@ discard block |
||
28 | 28 | |
29 | 29 | /** |
30 | 30 | * Minimum password length |
31 | + * @param integer $minLength |
|
31 | 32 | */ |
32 | 33 | public function minLength($minLength) { |
33 | 34 | $this->minLength = $minLength; |
@@ -39,8 +40,8 @@ discard block |
||
39 | 40 | * |
40 | 41 | * Eg: $this->characterStrength(3, array("lowercase", "uppercase", "digits", "punctuation")) |
41 | 42 | * |
42 | - * @param $minScore The minimum number of character tests that must pass |
|
43 | - * @param $testNames The names of the tests to perform |
|
43 | + * @param integer $minScore The minimum number of character tests that must pass |
|
44 | + * @param string[] $testNames The names of the tests to perform |
|
44 | 45 | */ |
45 | 46 | public function characterStrength($minScore, $testNames) { |
46 | 47 | $this->minScore = $minScore; |
@@ -50,6 +51,7 @@ discard block |
||
50 | 51 | |
51 | 52 | /** |
52 | 53 | * Check a number of previous passwords that the user has used, and don't let them change to that. |
54 | + * @param integer $count |
|
53 | 55 | */ |
54 | 56 | public function checkHistoricalPasswords($count) { |
55 | 57 | $this->historicalPasswordCount = $count; |