Key = $Key; $this->SearchTerm = $SearchTerm; $this->PreferredLanguage = $PreferredLanguage; $this->Filter = $Filter; $this->UserName = $UserName; } } /** * There should be no dots. * * @param string $a. * Some comment. * @param string $b. * Another comment. */ function test32($a, $b) { } /** * There should be no dots and comments should be on the next line. * * @param string $a. Some comment. * @param string $b. Another comment. */ function test33($a, $b) { } /** * Yield should be a recognised return statement. * * @return int * Integer value. */ function test34($a, $b) { for ($i = 1; $i <= 3; $i++) { yield $i; } } /** * Using \stdClass as type hint is ok, but not in the documentation. * * @param object $name * Some description. * @param \stdClass $param2 * Some description. */ function test35(\stdClass $name, \stdClass $param2) { } /** * Allow "object" as real type hint (PHP 7.2). * * @param \stdClass $arg * Something here. * @param object $blarg * Another thing. */ function test36(object $arg, object $blarg) { return $arg; } /** * A class with a method that has the same name as the class. */ class Small { /** * Our small constructor. */ public function __construct() { } /** * Return tag should be allowed here. * * @return string * Something small. */ public function small() { return 'string'; } } /** * Some short comment. * * @param array $matches * An array of matches by a preg_replace_callback() call that scans for * @import-ed CSS files, except for external CSS files. * @param array $sub_key * An array containing the sub-keys specifying the library asset, e.g. * @code['js']@endcode or @code['css', 'component']@endcode * @param string $to * The email address or addresses where the message will be sent to. The * formatting of this string will be validated with the * @link http://php.net/manual/filter.filters.validate.php PHP email @endlink. */ function test37(array $matches, array $sub_key, $to) { } /** * Yield from should be a recognised return statement. * * @return Generator * Generator value. */ function test38($a, $b) { yield from [$a, $b]; } /** * Allow "mixed" as real type hint (PHP 8.0). * * @param mixed $arg * Something here. */ function test39(mixed $arg) { return $arg; } /** * Test multiline comments with excess spaces in the param annotation. */ class Test40 { /** * Test method. * * @param string $errorMessage * It only breaks when this comment spans multiple lines but won't break if * you put it on a single line. */ public function test41(string $errorMessage) { } }