@@ -83,7 +83,6 @@ discard block |
||
| 83 | 83 | /** |
| 84 | 84 | * Adds a file to the concatenation/compression process. |
| 85 | 85 | * |
| 86 | - * @param String $path Path to the file to include in the compressed package/output. |
|
| 87 | 86 | */ |
| 88 | 87 | public function &addFile($file) { |
| 89 | 88 | $this->files .= ($this->files ? "," : "") . $file; |
@@ -256,7 +255,7 @@ discard block |
||
| 256 | 255 | /** |
| 257 | 256 | * Renders a script tag that loads the TinyMCE script. |
| 258 | 257 | * |
| 259 | - * @param Array $settings Name/value array with settings for the script tag. |
|
| 258 | + * @param Array $tagSettings Name/value array with settings for the script tag. |
|
| 260 | 259 | * @param Bool $return The script tag is return instead of being output if true |
| 261 | 260 | * @return String the tag is returned if $return is true |
| 262 | 261 | */ |
@@ -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,10 +583,10 @@ 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 | - * @param $subject |
|
| 588 | - * @param $content |
|
| 588 | + * @param string $subject |
|
| 589 | + * @param string $content |
|
| 589 | 590 | * @return array Contains the keys: 'type', 'to', 'from', 'subject', 'content', 'plainContent', 'attachedFiles', |
| 590 | 591 | * 'customHeaders', 'htmlContent', inlineImages' |
| 591 | 592 | */ |
@@ -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(); |
@@ -150,6 +150,12 @@ discard block |
||
| 150 | 150 | |
| 151 | 151 | /** |
| 152 | 152 | * Create a new email. |
| 153 | + * @param string $from |
|
| 154 | + * @param string $to |
|
| 155 | + * @param string $subject |
|
| 156 | + * @param string $body |
|
| 157 | + * @param string $cc |
|
| 158 | + * @param string $bcc |
|
| 153 | 159 | */ |
| 154 | 160 | public function __construct($from = null, $to = null, $subject = null, $body = null, $bounceHandlerURL = null, |
| 155 | 161 | $cc = null, $bcc = null) { |
@@ -168,6 +174,9 @@ discard block |
||
| 168 | 174 | parent::__construct(); |
| 169 | 175 | } |
| 170 | 176 | |
| 177 | + /** |
|
| 178 | + * @param string $data |
|
| 179 | + */ |
|
| 171 | 180 | public function attachFileFromString($data, $filename, $mimetype = null) { |
| 172 | 181 | $this->attachments[] = array( |
| 173 | 182 | 'contents' => $data, |
@@ -184,6 +193,10 @@ discard block |
||
| 184 | 193 | Deprecation::notice('4.0', 'Use "emailbouncehandler" module'); |
| 185 | 194 | } |
| 186 | 195 | |
| 196 | + /** |
|
| 197 | + * @param string $filename |
|
| 198 | + * @param string $mimetype |
|
| 199 | + */ |
|
| 187 | 200 | public function attachFile($filename, $attachedFilename = null, $mimetype = null) { |
| 188 | 201 | if(!$attachedFilename) $attachedFilename = basename($filename); |
| 189 | 202 | $absoluteFileName = Director::getAbsFile($filename); |
@@ -219,6 +232,9 @@ discard block |
||
| 219 | 232 | return $this->bcc; |
| 220 | 233 | } |
| 221 | 234 | |
| 235 | + /** |
|
| 236 | + * @param string $val |
|
| 237 | + */ |
|
| 222 | 238 | public function setSubject($val) { |
| 223 | 239 | $this->subject = $val; |
| 224 | 240 | return $this; |
@@ -311,6 +327,9 @@ discard block |
||
| 311 | 327 | return $this->ss_template; |
| 312 | 328 | } |
| 313 | 329 | |
| 330 | + /** |
|
| 331 | + * @return ViewableData |
|
| 332 | + */ |
|
| 314 | 333 | protected function templateData() { |
| 315 | 334 | if($this->template_data) { |
| 316 | 335 | return $this->template_data->customise(array( |
@@ -390,6 +409,7 @@ discard block |
||
| 390 | 409 | |
| 391 | 410 | /** |
| 392 | 411 | * Validates the email address. Returns true of false |
| 412 | + * @param string $address |
|
| 393 | 413 | */ |
| 394 | 414 | public static function validEmailAddress($address) { |
| 395 | 415 | if (function_exists('filter_var')) { |
@@ -611,8 +631,8 @@ discard block |
||
| 611 | 631 | /** |
| 612 | 632 | * Checks for RFC822-valid email format. |
| 613 | 633 | * |
| 614 | - * @param string $str |
|
| 615 | - * @return boolean |
|
| 634 | + * @param string $email |
|
| 635 | + * @return integer |
|
| 616 | 636 | * |
| 617 | 637 | * @copyright Cal Henderson <[email protected]> |
| 618 | 638 | * This code is licensed under a Creative Commons Attribution-ShareAlike 2.5 License |
@@ -23,8 +23,6 @@ |
||
| 23 | 23 | * $list = DataList::create('SiteTree'); |
| 24 | 24 | * $list = SiteTree::get(); |
| 25 | 25 | * |
| 26 | - * @param string $class the class name |
|
| 27 | - * @param mixed $arguments,... arguments to pass to the constructor |
|
| 28 | 26 | * @return static |
| 29 | 27 | */ |
| 30 | 28 | public static function create() { |
@@ -88,7 +88,7 @@ |
||
| 88 | 88 | * Add this callback to the chain of callbacks to call along with the state |
| 89 | 89 | * that $error must be in this point in the chain for the callback to be called |
| 90 | 90 | * |
| 91 | - * @param $callback - The callback to call |
|
| 91 | + * @param callable $callback - The callback to call |
|
| 92 | 92 | * @param $onErrorState - false if only call if no errors yet, true if only call if already errors, null for either |
| 93 | 93 | * @return $this |
| 94 | 94 | */ |
@@ -379,7 +379,7 @@ discard block |
||
| 379 | 379 | * |
| 380 | 380 | * Note that columns may be double quoted as per ANSI sql standard |
| 381 | 381 | * |
| 382 | - * @return DataList |
|
| 382 | + * @return ArrayList |
|
| 383 | 383 | * @see SS_List::sort() |
| 384 | 384 | * @example $list->sort('Name'); // default ASC sorting |
| 385 | 385 | * @example $list->sort('Name DESC'); // DESC sorting |
@@ -515,7 +515,7 @@ discard block |
||
| 515 | 515 | * $list = $list->filterAny(array('Name'=>array('bob','phil'), 'Age'=>array(21, 43))); |
| 516 | 516 | * |
| 517 | 517 | * @param string|array See {@link filter()} |
| 518 | - * @return DataList |
|
| 518 | + * @return ArrayList |
|
| 519 | 519 | */ |
| 520 | 520 | public function filterAny() { |
| 521 | 521 | $keepUs = call_user_func_array(array($this, 'normaliseFilterArgs'), func_get_args()); |
@@ -582,6 +582,9 @@ discard block |
||
| 582 | 582 | return $this->filter('ID', $ids); |
| 583 | 583 | } |
| 584 | 584 | |
| 585 | + /** |
|
| 586 | + * @param integer $id |
|
| 587 | + */ |
|
| 585 | 588 | public function byID($id) { |
| 586 | 589 | $firstElement = $this->filter("ID", $id)->first(); |
| 587 | 590 | |
@@ -666,7 +669,6 @@ discard block |
||
| 666 | 669 | /** |
| 667 | 670 | * Returns whether an item with $key exists |
| 668 | 671 | * |
| 669 | - * @param mixed $key |
|
| 670 | 672 | * @return bool |
| 671 | 673 | */ |
| 672 | 674 | public function offsetExists($offset) { |
@@ -676,7 +678,6 @@ discard block |
||
| 676 | 678 | /** |
| 677 | 679 | * Returns item stored in list with index $key |
| 678 | 680 | * |
| 679 | - * @param mixed $key |
|
| 680 | 681 | * @return DataObject |
| 681 | 682 | */ |
| 682 | 683 | public function offsetGet($offset) { |
@@ -686,7 +687,6 @@ discard block |
||
| 686 | 687 | /** |
| 687 | 688 | * Set an item with the key in $key |
| 688 | 689 | * |
| 689 | - * @param mixed $key |
|
| 690 | 690 | * @param mixed $value |
| 691 | 691 | */ |
| 692 | 692 | public function offsetSet($offset, $value) { |
@@ -700,7 +700,6 @@ discard block |
||
| 700 | 700 | /** |
| 701 | 701 | * Unset an item with the key in $key |
| 702 | 702 | * |
| 703 | - * @param mixed $key |
|
| 704 | 703 | */ |
| 705 | 704 | public function offsetUnset($offset) { |
| 706 | 705 | unset($this->items[$offset]); |
@@ -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. |
@@ -355,6 +356,7 @@ discard block |
||
| 355 | 356 | |
| 356 | 357 | /** |
| 357 | 358 | * Wrap the check for looking into Oembed JSON within $this->data. |
| 359 | + * @param string $field |
|
| 358 | 360 | */ |
| 359 | 361 | public function hasField($field) { |
| 360 | 362 | $this->loadData(); |
@@ -186,7 +186,7 @@ discard block |
||
| 186 | 186 | /** |
| 187 | 187 | * Gets the combined configuration of all LeafAndMain subclasses required by the client app. |
| 188 | 188 | * |
| 189 | - * @return array |
|
| 189 | + * @return string |
|
| 190 | 190 | * |
| 191 | 191 | * WARNING: Experimental API |
| 192 | 192 | */ |
@@ -876,6 +876,7 @@ discard block |
||
| 876 | 876 | * Return a list of appropriate templates for this class, with the given suffix using |
| 877 | 877 | * {@link SSViewer::get_templates_by_class()} |
| 878 | 878 | * |
| 879 | + * @param string $suffix |
|
| 879 | 880 | * @return array |
| 880 | 881 | */ |
| 881 | 882 | public function getTemplatesWithSuffix($suffix) { |
@@ -1745,7 +1746,7 @@ discard block |
||
| 1745 | 1746 | * The controller might not have any previewable content, in which case |
| 1746 | 1747 | * this method returns FALSE. |
| 1747 | 1748 | * |
| 1748 | - * @return String|boolean |
|
| 1749 | + * @return boolean |
|
| 1749 | 1750 | */ |
| 1750 | 1751 | public function LinkPreview() { |
| 1751 | 1752 | return false; |
@@ -1932,7 +1933,7 @@ discard block |
||
| 1932 | 1933 | } |
| 1933 | 1934 | |
| 1934 | 1935 | /** |
| 1935 | - * @return String |
|
| 1936 | + * @return DBField |
|
| 1936 | 1937 | */ |
| 1937 | 1938 | public function Locale() { |
| 1938 | 1939 | return DBField::create_field('Locale', i18n::get_locale()); |
@@ -2098,6 +2099,9 @@ discard block |
||
| 2098 | 2099 | return (parent::isFinished() || $this->isFinished); |
| 2099 | 2100 | } |
| 2100 | 2101 | |
| 2102 | + /** |
|
| 2103 | + * @param boolean $bool |
|
| 2104 | + */ |
|
| 2101 | 2105 | public function setIsFinished($bool) { |
| 2102 | 2106 | $this->isFinished = $bool; |
| 2103 | 2107 | } |
@@ -41,7 +41,7 @@ discard block |
||
| 41 | 41 | /** |
| 42 | 42 | * Given a TinyMCE pattern (close to unix glob style), create a regex that does the match |
| 43 | 43 | * |
| 44 | - * @param $str - The TinyMCE pattern |
|
| 44 | + * @param string|null $str - The TinyMCE pattern |
|
| 45 | 45 | * @return string - The equivalent regex |
| 46 | 46 | */ |
| 47 | 47 | protected function patternToRegex($str) { |
@@ -182,6 +182,7 @@ discard block |
||
| 182 | 182 | /** |
| 183 | 183 | * Given an attribute name, return the rule structure for that attribute |
| 184 | 184 | * @param string $name - The attribute name |
| 185 | + * @param stdClass $elementRule |
|
| 185 | 186 | * @return stdClass - The attribute rule |
| 186 | 187 | */ |
| 187 | 188 | protected function getRuleForAttribute($elementRule, $name) { |
@@ -245,7 +246,7 @@ discard block |
||
| 245 | 246 | * Given an SS_HTMLValue instance, will remove and elements and attributes that are |
| 246 | 247 | * not explicitly included in the whitelist passed to __construct on instance creation |
| 247 | 248 | * |
| 248 | - * @param SS_HTMLValue $html - The HTMLValue to remove any non-whitelisted elements & attributes from |
|
| 249 | + * @param HTMLValue $html - The HTMLValue to remove any non-whitelisted elements & attributes from |
|
| 249 | 250 | */ |
| 250 | 251 | public function sanitise (HTMLValue $html) { |
| 251 | 252 | if(!$this->elements && !$this->elementPatterns) return; |