Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better support for @return and @throws #19

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

n-peugnet
Copy link

@n-peugnet n-peugnet commented Apr 4, 2023

Example

	/**
	 * Parse a readable stream into an indexed :php:class:`SphinxInventory` object.
	 *
	 * @param resource	$stream		The resource to parse, opened in read mode.
	 * @param string	$baseURI	The base string to prepend to an object's location to get its final URI.
	 *
	 * @return SphinxInventory		The inventory parsed from the stream.
	 * @throws UnexpectedValueException	If an unexpected value is encountered while parsing.
	 */

Before:

2023-04-04-144333_627x518_scrot

After:

2023-04-04-144251_627x518_scrot

JSON diff:

--- before.json	2023-04-04 14:49:01.314363680 +0200
+++ after.json	2023-04-04 14:49:24.822424985 +0200
@@ -47,20 +47,18 @@
       {
         "type": "return",
         "types": [
           "SphinxInventory"
         ],
-        "name": "he",
-        "description": "inventory parsed from the stream."
+        "description": "The inventory parsed from the stream."
       },
       {
         "type": "throws",
         "types": [
           "UnexpectedValueException"
         ],
-        "name": "f",
-        "description": "an unexpected value is encountered while parsing."
+        "description": "If an unexpected value is encountered while parsing."
       }
     ],
     "description": "Parse a readable stream into an indexed :php:class:`SphinxInventory` object.",
     "isPrivate": false,
     "isProtected": false,

- Correctly parse Type and optional description components
  See <https://docs.phpdoc.org/latest/guide/references/phpdoc/tags/throws.html>
  and <https://docs.phpdoc.org/latest/guide/references/phpdoc/tags/return.html>
- Better rST rendering by outputting throws type and rtype field
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.

1 participant