@@ -78,9 +78,15 @@ |
||
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 |
@@ -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); |
@@ -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; |
@@ -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 | */ |
@@ -76,6 +76,9 @@ |
||
76 | 76 | return $this->token; |
77 | 77 | } |
78 | 78 | |
79 | + /** |
|
80 | + * @param string $token |
|
81 | + */ |
|
79 | 82 | public function setToken($token) { |
80 | 83 | $this->token = $token; |
81 | 84 | } |
@@ -38,6 +38,9 @@ discard block |
||
38 | 38 | */ |
39 | 39 | private static $nice_format = 'd/m/Y'; |
40 | 40 | |
41 | + /** |
|
42 | + * @param string|null $value |
|
43 | + */ |
|
41 | 44 | public function setValue($value, $record = null, $markChanged = true) { |
42 | 45 | if($value === false || $value === null || (is_string($value) && !strlen($value))) { |
43 | 46 | // don't try to evaluate empty values with strtotime() below, as it returns "1970-01-01" when it should be |
@@ -194,7 +197,7 @@ discard block |
||
194 | 197 | * Return a date formatted as per a CMS user's settings. |
195 | 198 | * |
196 | 199 | * @param Member $member |
197 | - * @return boolean | string A date formatted as per user-defined settings. |
|
200 | + * @return false|string | string A date formatted as per user-defined settings. |
|
198 | 201 | */ |
199 | 202 | public function FormatFromSettings($member = null) { |
200 | 203 | require_once 'Zend/Date.php'; |
@@ -21,7 +21,7 @@ discard block |
||
21 | 21 | * @param string $name |
22 | 22 | * @param int $wholeSize |
23 | 23 | * @param int $decimalSize |
24 | - * @param float|int $defaultValue |
|
24 | + * @param integer $defaultValue |
|
25 | 25 | */ |
26 | 26 | public function __construct($name = null, $wholeSize = 9, $decimalSize = 2, $defaultValue = 0) { |
27 | 27 | $this->wholeSize = is_int($wholeSize) ? $wholeSize : 9; |
@@ -33,14 +33,14 @@ discard block |
||
33 | 33 | } |
34 | 34 | |
35 | 35 | /** |
36 | - * @return float |
|
36 | + * @return string |
|
37 | 37 | */ |
38 | 38 | public function Nice() { |
39 | 39 | return number_format($this->value, $this->decimalSize); |
40 | 40 | } |
41 | 41 | |
42 | 42 | /** |
43 | - * @return int |
|
43 | + * @return double |
|
44 | 44 | */ |
45 | 45 | public function Int() { |
46 | 46 | return floor($this->value); |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | } |
84 | 84 | |
85 | 85 | /** |
86 | - * @return float |
|
86 | + * @return integer |
|
87 | 87 | */ |
88 | 88 | public function nullValue() { |
89 | 89 | return 0; |