diff --git a/phpdotnet/phd/Package/PHP/XHTML.php b/phpdotnet/phd/Package/PHP/XHTML.php index a50b1b23..9e83ed25 100644 --- a/phpdotnet/phd/Package/PHP/XHTML.php +++ b/phpdotnet/phd/Package/PHP/XHTML.php @@ -10,7 +10,12 @@ abstract class Package_PHP_XHTML extends Package_Generic_XHTML { 'chapter' => 'format_container_chunk', 'colophon' => 'format_chunk', 'function' => 'format_function', - 'methodname' => 'format_function', + 'methodname' => array( + /* DEFAULT */ 'format_function', + 'methodsynopsis' => 'format_methodsynopsis_function', + 'constructorsynopsis' => 'format_methodsynopsis_function', + 'destructorsynopsis' => 'format_methodsynopsis_function', + ), 'methodparam' => 'format_methodparam', 'methodsynopsis' => 'format_methodsynopsis', 'legalnotice' => 'format_chunk', @@ -840,6 +845,16 @@ public function format_function($open, $tag, $attrs, $props) { return ""; } + public function format_methodsynopsis_function($open, $tag, $attrs, $props) { + if ($open) { + return + 'function ' + . $this->format_function($open, $tag, $attrs, $props); + } + + return $this->format_function($open, $tag, $attrs, $props); + } + public function format_function_text($value, $tag, $display_value = null) { if ($this->getRole() === "function_replaceable") { return $this->TEXT($value); diff --git a/tests/package/php/bug49102-1.phpt b/tests/package/php/bug49102-1.phpt index 316809c7..98dc9cef 100644 --- a/tests/package/php/bug49102-1.phpt +++ b/tests/package/php/bug49102-1.phpt @@ -46,23 +46,23 @@ Content:
3. Class linking (non-FQN) in method/function parameter and return type
- +$paramName): Extension\Namespace\Existing_Class4. Class linking (FQN) in method/function parameter and return type
- +$paramName): \Extension\Namespace\Existing_ClassReturns new a ClassName object. diff --git a/tests/package/php/class_rendering_002.phpt b/tests/package/php/class_rendering_002.phpt index 302dbe6f..998deef8 100644 --- a/tests/package/php/class_rendering_002.phpt +++ b/tests/package/php/class_rendering_002.phpt @@ -27,7 +27,7 @@ Content:
Returns new a ClassName object. diff --git a/tests/package/php/enum_link_rendering.phpt b/tests/package/php/enum_link_rendering.phpt index 1b59946b..a8b6cc78 100644 --- a/tests/package/php/enum_link_rendering.phpt +++ b/tests/package/php/enum_link_rendering.phpt @@ -41,13 +41,13 @@ Content:
2. Enum linking (non-FQN) in method/function parameter and return type
- +3. Enum linking (FQN) in method/function parameter and return type
- +Constructs the Exception. diff --git a/tests/package/php/exception_rendering_002.phpt b/tests/package/php/exception_rendering_002.phpt index 327feb50..8eed9073 100644 --- a/tests/package/php/exception_rendering_002.phpt +++ b/tests/package/php/exception_rendering_002.phpt @@ -27,7 +27,7 @@ Content:
Constructs the Exception. diff --git a/tests/package/php/packagesynopsis_rendering_001.phpt b/tests/package/php/packagesynopsis_rendering_001.phpt index 6e8ba6b5..a9ffe9d9 100644 --- a/tests/package/php/packagesynopsis_rendering_001.phpt +++ b/tests/package/php/packagesynopsis_rendering_001.phpt @@ -42,7 +42,7 @@ Content:
%d. Function/method with no return type
-%d. Function/method with one return type - never
-%d. Function/method with one return type - void
-%d. Function/method with one return type - mixed
-%d. Function/method with union return type
- +%d. Function/method with nullable return type
- +%d. Function/method with nullable union return type
- +%d. Function/method with unknown return type
-1. Function/method with no parameters
-2. Function/method with one parameter
-$anything)3. Function/method with optional parameter
-$count = 0)4. Function/method with nullable parameter
- +5. Function/method with nullable optional parameter
- +6. Function/method with reference parameter
-&$reference)7. Function/method with union type parameter
- +8. Function/method with intersection type parameter
-$option)$option)9. Function/method with DNF (Disjunctive Normal Form) type parameter
-$option)$option)10. Function/method with more than three parameters
- +%d. Constructor with no parameters, no return type
-%d. Constructor with one parameter
- +%d. Constructor with optional parameter
- +%d. Constructor with nullable parameter
- +%d. Constructor with nullable optional parameter
- +%d. Constructor with reference parameter
- +%d. Constructor with union type parameter
- +%d. Constructor with intersection type parameter
-$option)$option)%d. Constructor with DNF (Disjunctive Normal Form) type parameter
-$option)$option)