@@ -192,7 +192,7 @@ |
||
192 | 192 | * |
193 | 193 | * @todo refactor this into GridFieldComponent |
194 | 194 | * |
195 | - * @param mixed $value |
|
195 | + * @param string $value |
|
196 | 196 | * @param string|array $castingDefinition |
197 | 197 | * |
198 | 198 | * @return mixed |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | * |
46 | 46 | * @param string $name The internal field name, passed to forms. |
47 | 47 | * @param string $title The human-readable field label. |
48 | - * @param mixed $value The value of the field. |
|
48 | + * @param integer $value The value of the field. |
|
49 | 49 | * @param string $config HTMLEditorConfig identifier to be used. Default to the active one. |
50 | 50 | */ |
51 | 51 | public function __construct($name, $title = null, $value = '', $config = null) { |
@@ -169,6 +169,10 @@ discard block |
||
169 | 169 | |
170 | 170 | protected $controller, $name; |
171 | 171 | |
172 | + /** |
|
173 | + * @param Controller|null $controller |
|
174 | + * @param string $name |
|
175 | + */ |
|
172 | 176 | public function __construct($controller, $name) { |
173 | 177 | parent::__construct(); |
174 | 178 | |
@@ -197,7 +201,7 @@ discard block |
||
197 | 201 | /** |
198 | 202 | * Searches the SiteTree for display in the dropdown |
199 | 203 | * |
200 | - * @return callback |
|
204 | + * @return DataList |
|
201 | 205 | */ |
202 | 206 | public function siteTreeSearchCallback($sourceObject, $labelField, $search) { |
203 | 207 | return DataObject::get($sourceObject)->filterAny(array( |
@@ -563,7 +567,7 @@ discard block |
||
563 | 567 | /** |
564 | 568 | * Find all anchors available on the given page. |
565 | 569 | * |
566 | - * @return array |
|
570 | + * @return string |
|
567 | 571 | */ |
568 | 572 | public function getanchors() { |
569 | 573 | $id = (int)$this->getRequest()->getVar('PageID'); |
@@ -607,6 +611,7 @@ discard block |
||
607 | 611 | * not the "master record" in the database - hence there's no form or saving logic. |
608 | 612 | * |
609 | 613 | * @param String Relative or absolute URL to file |
614 | + * @param HtmlEditorField_File $file |
|
610 | 615 | * @return FieldList |
611 | 616 | */ |
612 | 617 | protected function getFieldsForFile($url, $file) { |
@@ -628,6 +633,7 @@ discard block |
||
628 | 633 | } |
629 | 634 | |
630 | 635 | /** |
636 | + * @param HtmlEditorField_Embed $file |
|
631 | 637 | * @return FieldList |
632 | 638 | */ |
633 | 639 | protected function getFieldsForOembed($url, $file) { |
@@ -837,6 +843,7 @@ discard block |
||
837 | 843 | |
838 | 844 | /** |
839 | 845 | * @param Int |
846 | + * @param integer $parentID |
|
840 | 847 | * @return DataList |
841 | 848 | */ |
842 | 849 | protected function getFiles($parentID = null) { |
@@ -32,6 +32,10 @@ discard block |
||
32 | 32 | */ |
33 | 33 | protected $fieldCurrency = null; |
34 | 34 | |
35 | + /** |
|
36 | + * @param string $name |
|
37 | + * @param string $title |
|
38 | + */ |
|
35 | 39 | public function __construct($name, $title = null, $value = "") { |
36 | 40 | // naming with underscores to prevent values from actually being saved somewhere |
37 | 41 | $this->fieldAmount = new NumericField("{$name}[Amount]", _t('MoneyField.FIELDLABELAMOUNT', 'Amount')); |
@@ -132,6 +136,7 @@ discard block |
||
132 | 136 | /** |
133 | 137 | * @todo Implement removal of readonly state with $bool=false |
134 | 138 | * @todo Set readonly state whenever field is recreated, e.g. in setAllowedCurrencies() |
139 | + * @param boolean $bool |
|
135 | 140 | */ |
136 | 141 | public function setReadonly($bool) { |
137 | 142 | parent::setReadonly($bool); |
@@ -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) { |
@@ -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(); |
@@ -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 |