@@ -46,6 +46,7 @@ discard block |
||
| 46 | 46 | * |
| 47 | 47 | * @param $url Human-readable URL. |
| 48 | 48 | * @returns string/bool URL of an endpoint, or false if no matching provider exists. |
| 49 | + * @return string |
|
| 49 | 50 | */ |
| 50 | 51 | protected static function find_endpoint($url) { |
| 51 | 52 | foreach(self::get_providers() as $scheme=>$endpoint) { |
@@ -117,7 +118,7 @@ discard block |
||
| 117 | 118 | * Given a response body, determine if there is an autodiscover url |
| 118 | 119 | * |
| 119 | 120 | * @param string $body |
| 120 | - * @return bool|string |
|
| 121 | + * @return string|false |
|
| 121 | 122 | */ |
| 122 | 123 | public static function autodiscover_from_body($body) { |
| 123 | 124 | // Look within the body for an oembed link. |
@@ -259,6 +260,9 @@ discard block |
||
| 259 | 260 | parent::__construct(); |
| 260 | 261 | } |
| 261 | 262 | |
| 263 | + /** |
|
| 264 | + * @return string |
|
| 265 | + */ |
|
| 262 | 266 | public function getOembedURL() { |
| 263 | 267 | return $this->url; |
| 264 | 268 | } |
@@ -343,6 +347,7 @@ discard block |
||
| 343 | 347 | |
| 344 | 348 | /** |
| 345 | 349 | * Wrap the check for looking into Oembed JSON within $this->data. |
| 350 | + * @param string $field |
|
| 346 | 351 | */ |
| 347 | 352 | public function hasField($field) { |
| 348 | 353 | $this->loadData(); |
@@ -397,7 +397,7 @@ discard block |
||
| 397 | 397 | * |
| 398 | 398 | * Note that columns may be double quoted as per ANSI sql standard |
| 399 | 399 | * |
| 400 | - * @return DataList |
|
| 400 | + * @return ArrayList |
|
| 401 | 401 | * @see SS_List::sort() |
| 402 | 402 | * @example $list->sort('Name'); // default ASC sorting |
| 403 | 403 | * @example $list->sort('Name DESC'); // DESC sorting |
@@ -533,7 +533,7 @@ discard block |
||
| 533 | 533 | * $list = $list->filterAny(array('Name'=>array('bob','phil'), 'Age'=>array(21, 43))); |
| 534 | 534 | * |
| 535 | 535 | * @param string|array See {@link filter()} |
| 536 | - * @return DataList |
|
| 536 | + * @return ArrayList |
|
| 537 | 537 | */ |
| 538 | 538 | public function filterAny() { |
| 539 | 539 | $keepUs = call_user_func_array(array($this, 'normaliseFilterArgs'), func_get_args()); |
@@ -600,6 +600,9 @@ discard block |
||
| 600 | 600 | return $this->filter('ID', $ids); |
| 601 | 601 | } |
| 602 | 602 | |
| 603 | + /** |
|
| 604 | + * @param integer $id |
|
| 605 | + */ |
|
| 603 | 606 | public function byID($id) { |
| 604 | 607 | $firstElement = $this->filter("ID", $id)->first(); |
| 605 | 608 | |
@@ -684,7 +687,6 @@ discard block |
||
| 684 | 687 | /** |
| 685 | 688 | * Returns whether an item with $key exists |
| 686 | 689 | * |
| 687 | - * @param mixed $key |
|
| 688 | 690 | * @return bool |
| 689 | 691 | */ |
| 690 | 692 | public function offsetExists($offset) { |
@@ -694,7 +696,6 @@ discard block |
||
| 694 | 696 | /** |
| 695 | 697 | * Returns item stored in list with index $key |
| 696 | 698 | * |
| 697 | - * @param mixed $key |
|
| 698 | 699 | * @return DataObject |
| 699 | 700 | */ |
| 700 | 701 | public function offsetGet($offset) { |
@@ -704,7 +705,6 @@ discard block |
||
| 704 | 705 | /** |
| 705 | 706 | * Set an item with the key in $key |
| 706 | 707 | * |
| 707 | - * @param mixed $key |
|
| 708 | 708 | * @param mixed $value |
| 709 | 709 | */ |
| 710 | 710 | public function offsetSet($offset, $value) { |
@@ -718,7 +718,6 @@ discard block |
||
| 718 | 718 | /** |
| 719 | 719 | * Unset an item with the key in $key |
| 720 | 720 | * |
| 721 | - * @param mixed $key |
|
| 722 | 721 | */ |
| 723 | 722 | public function offsetUnset($offset) { |
| 724 | 723 | unset($this->items[$offset]); |
@@ -146,7 +146,7 @@ |
||
| 146 | 146 | * Add a number of items to the relation. |
| 147 | 147 | * |
| 148 | 148 | * @param array $items Items to add, as either DataObjects or IDs. |
| 149 | - * @return DataList |
|
| 149 | + * @return UnsavedRelationList |
|
| 150 | 150 | */ |
| 151 | 151 | public function addMany($items) { |
| 152 | 152 | foreach($items as $item) { |
@@ -111,6 +111,8 @@ discard block |
||
| 111 | 111 | |
| 112 | 112 | /** |
| 113 | 113 | * Override the function that constructs the result arrays to also prepare a 'php' item in the array |
| 114 | + * @param string $matchrule |
|
| 115 | + * @param string $name |
|
| 114 | 116 | */ |
| 115 | 117 | function construct($matchrule, $name, $arguments = null) { |
| 116 | 118 | $res = parent::construct($matchrule, $name, $arguments); |
@@ -172,9 +174,9 @@ discard block |
||
| 172 | 174 | |
| 173 | 175 | /** |
| 174 | 176 | * Ensures that the arguments to addOpenBlock and addClosedBlock are valid |
| 175 | - * @param $name |
|
| 176 | - * @param $callable |
|
| 177 | - * @param $type |
|
| 177 | + * @param string $name |
|
| 178 | + * @param callable $callable |
|
| 179 | + * @param string $type |
|
| 178 | 180 | * @throws InvalidArgumentException |
| 179 | 181 | */ |
| 180 | 182 | protected function validateExtensionBlock($name, $callable, $type) { |
@@ -737,6 +739,7 @@ discard block |
||
| 737 | 739 | * The basic generated PHP of LookupStep and LastLookupStep is the same, except that LookupStep calls 'obj' to |
| 738 | 740 | * get the next ViewableData in the sequence, and LastLookupStep calls different methods (XML_val, hasValue, obj) |
| 739 | 741 | * depending on the context the lookup is used in. |
| 742 | + * @param string $method |
|
| 740 | 743 | */ |
| 741 | 744 | function Lookup_AddLookupStep(&$res, $sub, $method) { |
| 742 | 745 | $res['LookupSteps'][] = $sub; |
@@ -4691,8 +4694,8 @@ discard block |
||
| 4691 | 4694 | * Compiles some passed template source code into the php code that will execute as per the template source. |
| 4692 | 4695 | * |
| 4693 | 4696 | * @throws SSTemplateParseException |
| 4694 | - * @param $string The source of the template |
|
| 4695 | - * @param string $templateName The name of the template, normally the filename the template source was loaded from |
|
| 4697 | + * @param string $string The source of the template |
|
| 4698 | + * @param string string The name of the template, normally the filename the template source was loaded from |
|
| 4696 | 4699 | * @param bool $includeDebuggingComments True is debugging comments should be included in the output |
| 4697 | 4700 | * @param bool $topTemplate True if this is a top template, false if it's just a template |
| 4698 | 4701 | * @return mixed|string The php that, when executed (via include or exec) will behave as per the template source |
@@ -4732,6 +4735,7 @@ discard block |
||
| 4732 | 4735 | |
| 4733 | 4736 | /** |
| 4734 | 4737 | * @param string $code |
| 4738 | + * @param string $templateName |
|
| 4735 | 4739 | * @return string $code |
| 4736 | 4740 | */ |
| 4737 | 4741 | protected function includeDebuggingComments($code, $templateName) { |
@@ -142,6 +142,7 @@ discard block |
||
| 142 | 142 | |
| 143 | 143 | /** |
| 144 | 144 | * Set the manifest to be used to look up test classes by helper functions |
| 145 | + * @param SS_ClassManifest $manifest |
|
| 145 | 146 | */ |
| 146 | 147 | public static function set_test_class_manifest($manifest) { |
| 147 | 148 | self::$test_class_manifest = $manifest; |
@@ -398,7 +399,7 @@ discard block |
||
| 398 | 399 | /** |
| 399 | 400 | * Get the ID of an object from the fixture. |
| 400 | 401 | * |
| 401 | - * @param $className The data class, as specified in your fixture file. Parent classes won't work |
|
| 402 | + * @param string $className The data class, as specified in your fixture file. Parent classes won't work |
|
| 402 | 403 | * @param $identifier The identifier string, as provided in your fixture file |
| 403 | 404 | * @return int |
| 404 | 405 | */ |
@@ -421,7 +422,7 @@ discard block |
||
| 421 | 422 | * Will collate all IDs form all fixtures if multiple fixtures are provided. |
| 422 | 423 | * |
| 423 | 424 | * @param string $className |
| 424 | - * @return array A map of fixture-identifier => object-id |
|
| 425 | + * @return A A map of fixture-identifier => object-id |
|
| 425 | 426 | */ |
| 426 | 427 | protected function allFixtureIDs($className) { |
| 427 | 428 | return $this->getFixtureFactory()->getIds($className); |
@@ -578,10 +579,10 @@ discard block |
||
| 578 | 579 | /** |
| 579 | 580 | * Assert that the matching email was sent since the last call to clearEmails() |
| 580 | 581 | * All of the parameters can either be a string, or, if they start with "/", a PREG-compatible regular expression. |
| 581 | - * @param $to |
|
| 582 | + * @param string $to |
|
| 582 | 583 | * @param $from |
| 583 | - * @param $subject |
|
| 584 | - * @param $content |
|
| 584 | + * @param string $subject |
|
| 585 | + * @param string $content |
|
| 585 | 586 | * @return array Contains the keys: 'type', 'to', 'from', 'subject', 'content', 'plainContent', 'attachedFiles', |
| 586 | 587 | * 'customHeaders', 'htmlContent', inlineImages' |
| 587 | 588 | */ |
@@ -742,7 +743,7 @@ discard block |
||
| 742 | 743 | * @param string $expectedSQL |
| 743 | 744 | * @param string $actualSQL |
| 744 | 745 | * @param string $message |
| 745 | - * @param float $delta |
|
| 746 | + * @param integer $delta |
|
| 746 | 747 | * @param integer $maxDepth |
| 747 | 748 | * @param boolean $canonicalize |
| 748 | 749 | * @param boolean $ignoreCase |
@@ -941,6 +942,7 @@ discard block |
||
| 941 | 942 | /** |
| 942 | 943 | * Create a member and group with the given permission code, and log in with it. |
| 943 | 944 | * Returns the member ID. |
| 945 | + * @return integer |
|
| 944 | 946 | */ |
| 945 | 947 | public function logInWithPermission($permCode = "ADMIN") { |
| 946 | 948 | if(!isset($this->cache_generatedMembers[$permCode])) { |
@@ -980,9 +982,9 @@ discard block |
||
| 980 | 982 | /** |
| 981 | 983 | * Test against a theme. |
| 982 | 984 | * |
| 983 | - * @param $themeBaseDir string - themes directory |
|
| 984 | - * @param $theme string - theme name |
|
| 985 | - * @param $callback Closure |
|
| 985 | + * @param string $themeBaseDir string - themes directory |
|
| 986 | + * @param string $theme string - theme name |
|
| 987 | + * @param Closure $callback Closure |
|
| 986 | 988 | */ |
| 987 | 989 | protected function useTestTheme($themeBaseDir, $theme, $callback) { |
| 988 | 990 | Config::nest(); |
@@ -589,7 +589,7 @@ discard block |
||
| 589 | 589 | /** |
| 590 | 590 | * Resize this image for the CMS. Use in templates with $CMSThumbnail |
| 591 | 591 | * |
| 592 | - * @return Image_Cached|null |
|
| 592 | + * @return Image|null |
|
| 593 | 593 | */ |
| 594 | 594 | public function CMSThumbnail() { |
| 595 | 595 | return $this->Pad($this->stat('cms_thumbnail_width'),$this->stat('cms_thumbnail_height')); |
@@ -631,7 +631,7 @@ discard block |
||
| 631 | 631 | /** |
| 632 | 632 | * Resize this image for use as a thumbnail in a strip. Use in templates with $StripThumbnail. |
| 633 | 633 | * |
| 634 | - * @return Image_Cached|null |
|
| 634 | + * @return Image|null |
|
| 635 | 635 | */ |
| 636 | 636 | public function StripThumbnail() { |
| 637 | 637 | return $this->Fill($this->stat('strip_thumbnail_width'),$this->stat('strip_thumbnail_height')); |
@@ -868,7 +868,7 @@ discard block |
||
| 868 | 868 | /** |
| 869 | 869 | * Generate patterns that will help to match filenames of cached images |
| 870 | 870 | * @param string $filename Filename of source image |
| 871 | - * @return array |
|
| 871 | + * @return string |
|
| 872 | 872 | */ |
| 873 | 873 | private function getFilenamePatterns($filename) { |
| 874 | 874 | $methodNames = $this->allMethodNames(true); |
@@ -1024,7 +1024,7 @@ discard block |
||
| 1024 | 1024 | |
| 1025 | 1025 | /** |
| 1026 | 1026 | * Get the orientation of this image. |
| 1027 | - * @return ORIENTATION_SQUARE | ORIENTATION_PORTRAIT | ORIENTATION_LANDSCAPE |
|
| 1027 | + * @return integer | ORIENTATION_PORTRAIT | ORIENTATION_LANDSCAPE |
|
| 1028 | 1028 | */ |
| 1029 | 1029 | public function getOrientation() { |
| 1030 | 1030 | $width = $this->getWidth(); |
@@ -758,7 +758,7 @@ discard block |
||
| 758 | 758 | * Extend permissions to include additional security for objects that are not published to live. |
| 759 | 759 | * |
| 760 | 760 | * @param Member $member |
| 761 | - * @return bool|null |
|
| 761 | + * @return false|null |
|
| 762 | 762 | */ |
| 763 | 763 | public function canView($member = null) { |
| 764 | 764 | // Invoke default version-gnostic canView |
@@ -832,7 +832,7 @@ discard block |
||
| 832 | 832 | * |
| 833 | 833 | * @param string $stage |
| 834 | 834 | * @param Member $member |
| 835 | - * @return bool |
|
| 835 | + * @return boolean|string |
|
| 836 | 836 | */ |
| 837 | 837 | public function canViewStage($stage = 'Live', $member = null) { |
| 838 | 838 | $oldMode = Versioned::get_reading_mode(); |
@@ -898,7 +898,7 @@ discard block |
||
| 898 | 898 | /** |
| 899 | 899 | * Get the latest published version of this object. |
| 900 | 900 | * |
| 901 | - * @return DataObject |
|
| 901 | + * @return string |
|
| 902 | 902 | */ |
| 903 | 903 | public function latestPublished() { |
| 904 | 904 | // Get the root data object class - this will have the version field |
@@ -1022,7 +1022,7 @@ discard block |
||
| 1022 | 1022 | * @param string $limit |
| 1023 | 1023 | * @param string $join Deprecated, use leftJoin($table, $joinClause) instead |
| 1024 | 1024 | * @param string $having |
| 1025 | - * @return DataList |
|
| 1025 | + * @return ArrayList |
|
| 1026 | 1026 | */ |
| 1027 | 1027 | public function Versions($filter = "", $sort = "", $limit = "", $join = "", $having = "") { |
| 1028 | 1028 | return $this->allVersions($filter, $sort, $limit, $join, $having); |
@@ -1036,7 +1036,7 @@ discard block |
||
| 1036 | 1036 | * @param string $limit |
| 1037 | 1037 | * @param string $join Deprecated, use leftJoin($table, $joinClause) instead |
| 1038 | 1038 | * @param string $having |
| 1039 | - * @return DataList |
|
| 1039 | + * @return ArrayList |
|
| 1040 | 1040 | */ |
| 1041 | 1041 | public function allVersions($filter = "", $sort = "", $limit = "", $join = "", $having = "") { |
| 1042 | 1042 | // Make sure the table names are not postfixed (e.g. _Live) |
@@ -1144,7 +1144,6 @@ discard block |
||
| 1144 | 1144 | * - If $_GET['archiveDate'] is set, it will use that date, and store it in the session. |
| 1145 | 1145 | * - If neither of these are set, it checks the session, otherwise the stage is set to 'Live'. |
| 1146 | 1146 | * |
| 1147 | - * @param Session $session Optional session within which to store the resulting stage |
|
| 1148 | 1147 | */ |
| 1149 | 1148 | public static function choose_site_stage() { |
| 1150 | 1149 | // Check any pre-existing session mode |
@@ -1356,7 +1355,7 @@ discard block |
||
| 1356 | 1355 | * @param string $filter A filter to be inserted into the WHERE clause. |
| 1357 | 1356 | * @param string $sort A sort expression to be inserted into the ORDER BY clause. |
| 1358 | 1357 | * @param string $join Deprecated, use leftJoin($table, $joinClause) instead |
| 1359 | - * @param string|int $limit A limit on the number of records returned from the database. |
|
| 1358 | + * @param integer $limit A limit on the number of records returned from the database. |
|
| 1360 | 1359 | * @param string $containerClass The container class for the result set (default is DataList) |
| 1361 | 1360 | * |
| 1362 | 1361 | * @return DataList A modified DataList designated to the specified stage |
@@ -2,12 +2,11 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace SilverStripe\Framework\Test\Behaviour; |
| 4 | 4 | |
| 5 | -use Behat\Behat\Context\BehatContext, |
|
| 6 | - Behat\Behat\Context\Step, |
|
| 7 | - Behat\Behat\Event\StepEvent, |
|
| 8 | - Behat\Mink\Element\NodeElement, |
|
| 9 | - Behat\Mink\Session, |
|
| 10 | - WebDriver\Exception\UnexpectedAlertOpen; |
|
| 5 | +use Behat\Behat\Context\BehatContext; |
|
| 6 | +use Behat\Behat\Context\Step; |
|
| 7 | +use Behat\Behat\Event\StepEvent; |
|
| 8 | +use Behat\Mink\Element\NodeElement; |
|
| 9 | +use Behat\Mink\Session; |
|
| 11 | 10 | |
| 12 | 11 | |
| 13 | 12 | // PHPUnit |
@@ -379,7 +379,7 @@ discard block |
||
| 379 | 379 | /** |
| 380 | 380 | * Return the IDs of all the marked nodes. |
| 381 | 381 | * |
| 382 | - * @return array |
|
| 382 | + * @return integer[] |
|
| 383 | 383 | */ |
| 384 | 384 | public function markedNodeIDs() { |
| 385 | 385 | return array_keys($this->markedNodes); |
@@ -756,7 +756,7 @@ discard block |
||
| 756 | 756 | * Get the next node in the tree of the type. If there is no instance of the className descended from this node, |
| 757 | 757 | * then search the parents. |
| 758 | 758 | * @param string $className Class name of the node to find. |
| 759 | - * @param string|int $root ID/ClassName of the node to limit the search to |
|
| 759 | + * @param integer $root ID/ClassName of the node to limit the search to |
|
| 760 | 760 | * @param DataObject $afterNode Used for recursive calls to this function |
| 761 | 761 | * @return DataObject |
| 762 | 762 | */ |