Bug: Error parsing multiline PHPDOC @params
Problem Statement
The PHPDOC parser in Hazaar is currently unable to correctly parse multiline descriptions for @param
elements in docblocks. This results in incomplete or incorrectly formatted parameter descriptions in the generated API documentation.
Steps to Reproduce
- Add a multiline description to a
@param
annotation in a docblock. - Run the Hazaar API documentation generator.
- Observe that the description is either truncated, improperly formatted, or missing in the output.
Expected Behavior
- The parser should correctly capture and concatenate multiline descriptions for
@param
elements, preserving their intended formatting.
Actual Behavior
- The parser fails to properly associate additional lines with the correct
@param
element. - In some cases, only the first line of the description is included, while the remaining lines are ignored or incorrectly associated.
Benefits and Risks
Benefits
- Fixing this issue will ensure that function parameter descriptions are fully captured and accurately represented in the API documentation.
- Improves the quality and readability of generated documentation.
- Helps developers understand function parameters better by preserving full descriptions.
Risks
- Modifying the parser may introduce unintended side effects if not thoroughly tested.
- Edge cases in formatting (e.g., mixed indentation styles) may need to be handled carefully.
Proposed Solution
- Update the PHPDOC parser to correctly detect and associate multiline descriptions with their respective
@param
elements. - Adjust the parsing logic to handle indentation and line continuation correctly.
- Write test cases to validate correct handling of multiline
@param
descriptions. - Verify that other docblock elements (e.g.,
@return
,@throws
) are not affected by the changes.