@@ -139,6 +139,7 @@ discard block |
||
| 139 | 139 | |
| 140 | 140 | /** |
| 141 | 141 | * Set the manifest to be used to look up test classes by helper functions |
| 142 | + * @param SS_ClassManifest $manifest |
|
| 142 | 143 | */ |
| 143 | 144 | public static function set_test_class_manifest($manifest) { |
| 144 | 145 | self::$test_class_manifest = $manifest; |
@@ -422,7 +423,7 @@ discard block |
||
| 422 | 423 | * Will collate all IDs form all fixtures if multiple fixtures are provided. |
| 423 | 424 | * |
| 424 | 425 | * @param string $className |
| 425 | - * @return array A map of fixture-identifier => object-id |
|
| 426 | + * @return A A map of fixture-identifier => object-id |
|
| 426 | 427 | */ |
| 427 | 428 | protected function allFixtureIDs($className) { |
| 428 | 429 | return $this->getFixtureFactory()->getIds($className); |
@@ -582,7 +583,7 @@ discard block |
||
| 582 | 583 | /** |
| 583 | 584 | * Assert that the matching email was sent since the last call to clearEmails() |
| 584 | 585 | * All of the parameters can either be a string, or, if they start with "/", a PREG-compatible regular expression. |
| 585 | - * @param $to |
|
| 586 | + * @param string $to |
|
| 586 | 587 | * @param $from |
| 587 | 588 | * @param $subject |
| 588 | 589 | * @param $content |
@@ -753,7 +754,7 @@ discard block |
||
| 753 | 754 | * @param string $expectedSQL |
| 754 | 755 | * @param string $actualSQL |
| 755 | 756 | * @param string $message |
| 756 | - * @param float $delta |
|
| 757 | + * @param integer $delta |
|
| 757 | 758 | * @param integer $maxDepth |
| 758 | 759 | * @param boolean $canonicalize |
| 759 | 760 | * @param boolean $ignoreCase |
@@ -1039,9 +1040,9 @@ discard block |
||
| 1039 | 1040 | /** |
| 1040 | 1041 | * Test against a theme. |
| 1041 | 1042 | * |
| 1042 | - * @param $themeBaseDir string - themes directory |
|
| 1043 | - * @param $theme string - theme name |
|
| 1044 | - * @param $callback Closure |
|
| 1043 | + * @param string $themeBaseDir string - themes directory |
|
| 1044 | + * @param string $theme string - theme name |
|
| 1045 | + * @param Closure $callback Closure |
|
| 1045 | 1046 | */ |
| 1046 | 1047 | protected function useTestTheme($themeBaseDir, $theme, $callback) { |
| 1047 | 1048 | Config::nest(); |
@@ -98,7 +98,7 @@ |
||
| 98 | 98 | * Find version of this object in the given stage |
| 99 | 99 | * |
| 100 | 100 | * @param string $stage |
| 101 | - * @return Versioned|DataObject |
|
| 101 | + * @return DataObject|null |
|
| 102 | 102 | */ |
| 103 | 103 | private function getObjectInStage($stage) { |
| 104 | 104 | return Versioned::get_by_stage($this->ObjectClass, $stage)->byID($this->ObjectID); |
@@ -1053,7 +1053,7 @@ discard block |
||
| 1053 | 1053 | /** |
| 1054 | 1054 | * Find objects in the given relationships, merging them into the given list |
| 1055 | 1055 | * |
| 1056 | - * @param array $source Config property to extract relationships from |
|
| 1056 | + * @param string $source Config property to extract relationships from |
|
| 1057 | 1057 | * @param bool $recursive True if recursive |
| 1058 | 1058 | * @param ArrayList $list Optional list to add items to |
| 1059 | 1059 | * @return ArrayList The list |
@@ -1173,7 +1173,7 @@ discard block |
||
| 1173 | 1173 | /** |
| 1174 | 1174 | * Check if the current user can delete this record from live |
| 1175 | 1175 | * |
| 1176 | - * @param null $member |
|
| 1176 | + * @param null|DataObject $member |
|
| 1177 | 1177 | * @return mixed |
| 1178 | 1178 | */ |
| 1179 | 1179 | public function canUnpublish($member = null) { |
@@ -1283,7 +1283,7 @@ discard block |
||
| 1283 | 1283 | * Extend permissions to include additional security for objects that are not published to live. |
| 1284 | 1284 | * |
| 1285 | 1285 | * @param Member $member |
| 1286 | - * @return bool|null |
|
| 1286 | + * @return false|null |
|
| 1287 | 1287 | */ |
| 1288 | 1288 | public function canView($member = null) { |
| 1289 | 1289 | // Invoke default version-gnostic canView |
@@ -1358,7 +1358,7 @@ discard block |
||
| 1358 | 1358 | * |
| 1359 | 1359 | * @param string $stage |
| 1360 | 1360 | * @param Member $member |
| 1361 | - * @return bool |
|
| 1361 | + * @return boolean|string |
|
| 1362 | 1362 | */ |
| 1363 | 1363 | public function canViewStage($stage = 'Live', $member = null) { |
| 1364 | 1364 | $oldMode = Versioned::get_reading_mode(); |
@@ -1428,7 +1428,7 @@ discard block |
||
| 1428 | 1428 | /** |
| 1429 | 1429 | * Get the latest published DataObject. |
| 1430 | 1430 | * |
| 1431 | - * @return DataObject |
|
| 1431 | + * @return string |
|
| 1432 | 1432 | */ |
| 1433 | 1433 | public function latestPublished() { |
| 1434 | 1434 | // Get the root data object class - this will have the version field |
@@ -2386,7 +2386,7 @@ discard block |
||
| 2386 | 2386 | /** |
| 2387 | 2387 | * Returns an array of possible stages. |
| 2388 | 2388 | * |
| 2389 | - * @return array |
|
| 2389 | + * @return string[] |
|
| 2390 | 2390 | */ |
| 2391 | 2391 | public function getVersionedStages() { |
| 2392 | 2392 | if($this->hasStages()) { |
@@ -27,6 +27,9 @@ |
||
| 27 | 27 | return $this->can(__FUNCTION__, $member, $context); |
| 28 | 28 | } |
| 29 | 29 | |
| 30 | + /** |
|
| 31 | + * @param string $perm |
|
| 32 | + */ |
|
| 30 | 33 | public function can($perm, $member = null, $context = array()) { |
| 31 | 34 | $perms = [ |
| 32 | 35 | "PERM_{$perm}", |