Skip to content

Prefixed examples: Add function docs#14

Merged
akirk merged 3 commits intoakirk:mainfrom
obenland:add/function-docs
Aug 1, 2025
Merged

Prefixed examples: Add function docs#14
akirk merged 3 commits intoakirk:mainfrom
obenland:add/function-docs

Conversation

@obenland
Copy link
Copy Markdown
Contributor

  • Integrate PHPDoc-style function documentation directly into prefixed example style.
  • Align parameter variables in @param annotations for improved readability.
  • Ensure descriptions end with trailing periods for consistency.
  • Add parameter descriptions from hook metadata when available.
  • Update test fixtures to reflect the new integrated documentation style.

obenland added 3 commits July 30, 2025 09:35
- Integrate PHPDoc-style function documentation directly into prefixed example style
- Align parameter variables in @param annotations for improved readability
- Ensure descriptions end with trailing periods for consistency
- Add parameter descriptions from hook metadata when available
- Update test fixtures to reflect the new integrated documentation style
- Create FunctionDocsTest class to validate function documentation generation
- Remove redundant newlines in generated documentation blocks
*
* @param string $setting
* @param int $user_id
* @param array $options
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's still missing parameter docs. Will do that in a follow-up PR.

Copy link
Copy Markdown
Owner

@akirk akirk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! I might make this configurable so that you can switch it off to have shorter example code.

@akirk akirk merged commit 2bad535 into akirk:main Aug 1, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants