+
+
+
1. Function/method with no return type
+
+ function_name()
+
+
+
+
+
2. Function/method with one return type - never
+
+
+
+
+
+
3. Function/method with one return type - void
+
+
+
+
+
+
4. Function/method with one return type - void element
+
+
+
+
+
+
5. Function/method with one return type - mixed
+
+
+
+
+
+
6. Function/method with union return type
+
+
+
+
+
+
7. Function/method with nullable return type
+
+
+
+
+
+
8. Function/method with nullable union return type
+
+
+
+
+
+
9. Function/method with unknown return type
+
function_name(): UnknownType
+
+
+
+
diff --git a/tests/php/type_rendering_002.phpt b/tests/php/type_rendering_002.phpt
new file mode 100644
index 000000000..e44a1c80a
--- /dev/null
+++ b/tests/php/type_rendering_002.phpt
@@ -0,0 +1,100 @@
+--TEST--
+Type rendering 002 - Methodsynopsis parameters and parameter types
+--FILE--
+ true,
+ "xml_root" => dirname($xml_file),
+ "xml_file" => $xml_file,
+ "output_dir" => __DIR__ . "/output/",
+);
+
+$extra = array(
+ "lang_dir" => __PHDDIR__ . "phpdotnet/phd/data/langs/",
+ "phpweb_version_filename" => dirname($xml_file) . '/version.xml',
+ "phpweb_acronym_filename" => dirname($xml_file) . '/acronyms.xml',
+);
+
+$render = new TestRender($formatclass, $opts, $extra);
+
+if (Index::requireIndexing() && !file_exists($opts["output_dir"])) {
+ mkdir($opts["output_dir"], 0755);
+}
+
+$render->run();
+?>
+--EXPECT--
+Filename: type-rendering-methodsynopsis-parameters.html
+Content:
+
+
+
+
1. Function/method with no parameters
+
+ function_name()
+
+
+
+
+
2. Function/method with one parameter
+
function_name(
mixed $anything
)
+
+
+
+
+
3. Function/method with optional parameter
+
function_name(
int $count
= 0)
+
+
+
+
+
4. Function/method with nullable parameter
+
+
+
+
+
+
5. Function/method with nullable optional parameter
+
function_name(
?string $options
= "")
+
+
+
+
+
6. Function/method with reference parameter
+
function_name(
array &$reference
)
+
+
+
+
+
7. Function/method with union type parameter
+
+
+
+
+
+
8. Function/method with intersection type parameter
+
function_name(Countable&Traversable $option
)
+
+
+
+
+
9. Function/method with DNF (Disjunctive Normal Form) type parameter
+
function_name((Countable&Traversable)|DOMAttr $option
)
+
+
+
+
+
10. Function/method with more than three parameters
+
+
+
+
+
diff --git a/tests/php/type_rendering_003.phpt b/tests/php/type_rendering_003.phpt
new file mode 100644
index 000000000..03a30c7d4
--- /dev/null
+++ b/tests/php/type_rendering_003.phpt
@@ -0,0 +1,106 @@
+--TEST--
+Type rendering 003 - Constructorsynopsis parameters and parameter types
+--FILE--
+ true,
+ "xml_root" => dirname($xml_file),
+ "xml_file" => $xml_file,
+ "output_dir" => __DIR__ . "/output/",
+);
+
+$extra = array(
+ "lang_dir" => __PHDDIR__ . "phpdotnet/phd/data/langs/",
+ "phpweb_version_filename" => dirname($xml_file) . '/version.xml',
+ "phpweb_acronym_filename" => dirname($xml_file) . '/acronyms.xml',
+);
+
+$render = new TestRender($formatclass, $opts, $extra);
+
+if (Index::requireIndexing() && !file_exists($opts["output_dir"])) {
+ mkdir($opts["output_dir"], 0755);
+}
+
+$render->run();
+?>
+--EXPECT--
+Filename: type-rendering-constructorsynopsis-parameters-and-return-type.html
+Content:
+
+
+
+
1. Constructor with no parameters, no return type
+
+ final public ClassName::__construct()
+
+
+
+
+
2. Constructor with no parameters, void (element) return type
+
final public ClassName::__construct():
void
+
+
+
+
+
3. Constructor with one parameter
+
final private ClassName::__construct(
mixed $anything
)
+
+
+
+
+
4. Constructor with optional parameter
+
final protected ClassName::__construct(
int $count
= 0)
+
+
+
+
+
5. Constructor with nullable parameter
+
final public ClassName::__construct(
?float $value
)
+
+
+
+
+
6. Constructor with nullable optional parameter
+
final private ClassName::__construct(
?string $options
= "")
+
+
+
+
+
7. Constructor with reference parameter
+
final protected ClassName::__construct(
array &$reference
)
+
+
+
+
+
8. Constructor with union type parameter
+
+
+
+
+
+
9. Constructor with intersection type parameter
+
final public ClassName::__construct(Countable&Traversable $option
)
+
+
+
+
+
10. Constructor with DNF (Disjunctive Normal Form) type parameter
+
final public ClassName::__construct((Countable&Traversable)|DOMAttr $option
)
+
+
+
+
+
11. Constructor with more than three parameters
+
final private ClassName::__construct(
int $count
,
string $name
,
bool $isSomething
,
array $list
)
+
+
+
+