{"id":14111195,"url":"https://github.com/neild3r/vscode-php-docblocker","last_synced_at":"2026-02-21T10:31:48.520Z","repository":{"id":18624668,"uuid":"84724664","full_name":"neild3r/vscode-php-docblocker","owner":"neild3r","description":"Simple docblocker for php","archived":false,"fork":false,"pushed_at":"2023-01-07T11:31:29.000Z","size":1149,"stargazers_count":95,"open_issues_count":45,"forks_count":30,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-11-21T20:14:22.706Z","etag":null,"topics":["docblock","extension","php","vscode"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/neild3r.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-03-12T12:43:31.000Z","updated_at":"2025-01-08T17:56:02.000Z","dependencies_parsed_at":"2023-01-13T19:55:45.599Z","dependency_job_id":null,"html_url":"https://github.com/neild3r/vscode-php-docblocker","commit_stats":null,"previous_names":[],"tags_count":34,"template":false,"template_full_name":null,"purl":"pkg:github/neild3r/vscode-php-docblocker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neild3r%2Fvscode-php-docblocker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neild3r%2Fvscode-php-docblocker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neild3r%2Fvscode-php-docblocker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neild3r%2Fvscode-php-docblocker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/neild3r","download_url":"https://codeload.github.com/neild3r/vscode-php-docblocker/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neild3r%2Fvscode-php-docblocker/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29679049,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-21T09:33:50.764Z","status":"ssl_error","status_checked_at":"2026-02-21T09:33:19.949Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docblock","extension","php","vscode"],"created_at":"2024-08-14T10:03:11.254Z","updated_at":"2026-02-21T10:31:48.506Z","avatar_url":"https://github.com/neild3r.png","language":"TypeScript","readme":"# PHP DocBlocker\n\n[![Latest Release](https://vsmarketplacebadge.apphb.com/version-short/neilbrayfield.php-docblocker.svg)](https://marketplace.visualstudio.com/items?itemName=neilbrayfield.php-docblocker) [![Installs](https://vsmarketplacebadge.apphb.com/installs/neilbrayfield.php-docblocker.svg)](https://marketplace.visualstudio.com/items?itemName=neilbrayfield.php-docblocker) [![Rating](https://vsmarketplacebadge.apphb.com/rating-short/neilbrayfield.php-docblocker.svg)](https://marketplace.visualstudio.com/items?itemName=neilbrayfield.php-docblocker) [![Test Suite](https://github.com/neild3r/vscode-php-docblocker/actions/workflows/test.yml/badge.svg)](https://github.com/neild3r/vscode-php-docblocker/actions/workflows/test.yml) [![Coverage status](https://coveralls.io/repos/github/neild3r/vscode-php-docblocker/badge.svg)](https://coveralls.io/github/neild3r/vscode-php-docblocker)\n\nBasic PHP DocBlocking extension.\n\nWe now have a set of unit tests and some full coverage on the parsing of signatures as well as continuous integration. This should ensure the extension remains stable as development progresses.\n\n## Features\n\n* Completion snippet after `/**` above a class, function, class property\n* Completion of DocBlock tags such as `@param`, `@return`, `@throws`\n* Inferring of param and return types from signatures\n* Configuration of template for each type of docblock completion\n\n## Requirements\n\nThis extension has no dependencies.\n\n## Extension Settings\n\nThis extension contributes the following settings:\n\n* `php-docblocker.gap`: set to `false` to disable the gap between the description and tags\n* `php-docblocker.returnGap`: set to `true` to add a gap between the param and return tags\n* `php-docblocker.returnVoid`: set to `false` to turn off the automatic void return type when it can't be determined\n* `php-docblocker.defaultType`: default type to use if a type wasn't able to to be determined\n* `php-docblocker.extra`: an array of extra tags to add to each DocBlock (These can include tabstops and snippet variables)\n* `php-docblocker.useShortNames`: Whether we should use short type names. e.g. bool or boolean\n* `php-docblocker.qualifyClassNames`: When adding type hints for class names search namespace use statements and qualify the class\n* `php-docblocker.alignParams`: set to `true` to align params vertically and add appropriate spaces after param names\n* `php-docblocker.alignReturn`: set to `true` to align return vertically with above params statements, this setting requires align params to also be active\n* `php-docblocker.varDescription`: set to `true` to include a description placeholder for `@var` completions. If you specify a string this will be the default placeholder text\n* `php-docblocker.paramDescription`: set to `true` to include a description placeholder for `@param` completions. If you specify a string this will be the default placeholder text\n* `php-docblocker.returnDescription`: set to `true` to include a description placeholder for `@return` completions. If you specify a string this will be the default placeholder text\n* `php-docblocker.author`: An object containing your default author tag settings\n* `php-docblocker.functionTemplate`: See below for how to set up docblock templates\n* `php-docblocker.propertyTemplate`: See below for how to set up docblock templates\n* `php-docblocker.classTemplate`: See below for how to set up docblock templates\n\n### Templating\n\nIf you want more control over the order or gap settings on your docblocks or you want different things for properties vs class templates\nyou can start customising the template configuration objects. These are the config options `functionTemplate`, `propertyTemplate` and\n`classTemplate`.\n\n#### Default set up for function\n\nThe below is the default set up for a function. The order of the keys represents the output order. There are no specific options in each\nconfig option per key to add additional control.\n\n```json\n    {\n        \"message\": {},\n        \"param\": {},\n        \"return\": {},\n        \"extra\": {}\n    }\n```\n\n#### Supported template keys\n\n| Key             | Aplies to type  | Description                                                                       |\n|-----------------|-----------------|-----------------------------------------------------------------------------------|\n| message         | All             | Space for entering a description of your block                                    |\n| extra           | All             | Adds in your custom tags from the extra config                                    |\n| param           | Function        | Function @param items                                                             |\n| return          | Function        | Function @return item                                                             |\n| var             | Property        | Property @var item                                                                |\n| *               | All             | This is for any key that is unmatched you can use the content option to add a tag |\n\n#### Supported template config options\n\n| Option          | Aplies to key(s) | Description                                    |\n|-----------------|------------------|------------------------------------------------|\n| gapBefore       | All              | Adds a gap before the tag section starts       |\n| gapAfter        | All              | Adds a gap after the tag section ends          |\n| content         | *                | Adds a gap after the tag section ends          |\n\n#### Configured function template example\n\nIn the example below we have added some gap configuration and removed the return tag for our template as well as\nchanging the default order. This means we'll never have a @return tag and extra comes before the params. It's also\nworth pointing out that the gapAfter in the message is the same as setting the gap config option in the main config\nto true.\n\n```json\n    {\n        \"message\": {\n            \"gapAfter\": true\n        },\n        \"extra\": {},\n        \"param\": {\n            \"gapBefore\": true\n        },\n    }\n```\n\n#### Configured function with extra content and placeholders\n\nThe example below won't have a return tag and will add in an author tag with correct placeholders depending on\nhow many options you have. You can put in placeholders by using `###` in place of the tab stop number and it\nwill be calculated at generation time.\n\n```json\n    {\n        \"message\": {\n            \"gapAfter\": true\n        },\n        \"param\": {\n            \"gapBefore\": true\n        },\n        \"author\": {\n            \"content\": \"@author ${###:Neil Brayfield} \u003c${###:neil@test.com}\u003e\"\n        }\n    }\n```\n\n## Supported DocBlock tags\n\nPlease see below for a list of supported tags and their snippets. These tags are available within a DocBlock\nand can be triggered by typing @ then another characted (Provided your vscode settings allow).\n\n| Tag                                   | Snippet                                                  |\n| ------------------------------------- | -------------------------------------------------------- |\n| @api                                  | @api                                                     |\n| @abstract                             | @abstract                                                |\n| @after                                | @after                                                   |\n| @afterClass                           | @afterClass                                              |\n| @author                               | @author ${1:{{name}}} \u003c${2:{{email}}}\u003e                   |\n| @backupGlobals                        | @backupGlobals ${1:switch}                               |\n| @backupStaticAttributes               | @backupStaticAttributes ${1:switch}                      |\n| @before                               | @before                                                  |\n| @beforeClass                          | @beforeClass                                             |\n| @category                             | @category ${1:description}                               |\n| @codeCoverageIgnore                   | @codeCoverageIgnore                                      |\n| @codeCoverageIgnoreEnd                | @codeCoverageIgnoreEnd                                   |\n| @codeCoverageIgnoreStart              | @codeCoverageIgnoreStart                                 |\n| @copyright                            | @copyright ${1:2021} ${2:Name}                           |\n| @covers                               | @covers ${1:fqcn}                                        |\n| @coversDefaultClass                   | @coversDefaultClass ${1:fqcn}                            |\n| @coversNothing                        | @coversNothing                                           |\n| @dataProvider                         | @dataProvider ${1:methodName}                            |\n| @depends                              | @depends ${1:methodName}                                 |\n| @deprecated                           | @deprecated ${1:version}                                 |\n| @doesNotPerformAssertions             | @doesNotPerformAssertions                                |\n| @example                              | @example ${1:location} ${2:description}                  |\n| @filesource                           | @filesource                                              |\n| @final                                | @final                                                   |\n| @group                                | @group ${1:group}                                        |\n| @global                               | @global                                                  |\n| @ignore                               | @ignore ${1:description}                                 |\n| @inheritDoc                           | @inheritDoc                                              |\n| @internal                             | @internal ${1:description}                               |\n| @large                                | @large                                                   |\n| @license                              | @license ${1:MIT}                                        |\n| @link                                 | @link ${1:http://url.com}                                |\n| @medium                               | @medium                                                  |\n| @method                               | @method ${1:mixed} ${2:methodName()}                     |\n| @mixin                                | @mixin ${1:\\MyClass}                                     |\n| @package                              | @package ${1:category}                                   |\n| @param                                | @param ${1:mixed} $${2:name}                             |\n| @preserveGlobalState                  | @preserveGlobalState ${1:switch}                         |\n| @property                             | @property ${1:mixed} $${2:name}                          |\n| @property-read                        | @property-read ${1:mixed} $${2:name}                     |\n| @property-write                       | @property-write ${1:mixed} $${2:name}                    |\n| @requires                             | @requires ${1:mixed}                                     |\n| @return                               | @return ${1:mixed}                                       |\n| @runInSeparateProcess                 | @runInSeparateProcess                                    |\n| @runTestsInSeparateProcesses          | @runTestsInSeparateProcesses                             |\n| @see                                  | @see ${1:http://url.com}                                 |\n| @since                                | @since ${1:1.0.0}                                        |\n| @small                                | @small                                                   |\n| @source                               | @source ${1:location} ${2:description}                   |\n| @static                               | @static                                                  |\n| @subpackage                           | @subpackage ${1:category}                                |\n| @test                                 | @test                                                    |\n| @testdox                              | @testdox ${1:description}                                |\n| @testWith                             | @testWith ${1:elements}                                  |\n| @throws                               | @throws ${1:Exception}                                   |\n| @ticket                               | @ticket ${1:ticket}                                      |\n| @todo                                 | @todo ${1:Something}                                     |\n| @uses                                 | @uses ${1:MyClass::function} ${2:Name}                   |\n| @var                                  | @var ${1:mixed}                                          |\n| @version                              | @version ${1:1.0.0}                                      |\n| @psalm-var (Psalm)                    | @psalm-var ${1:mixed}                                    |\n| @psalm-param (Psalm)                  | @psalm-param ${1:mixed} $${2:name}                       |\n| @psalm-return (Psalm)                 | @psalm-return ${1:mixed}                                 |\n| @psalm-suppress (Psalm)               | @psalm-suppress ${1:IssueName}                           |\n| @psalm-assert (Psalm)                 | @psalm-assert ${1:[assertion]} $${2:var}                 |\n| @psalm-assert-if-true (Psalm)         | @psalm-assert-if-true ${1:[assertion]} $${2:var}         |\n| @psalm-assert-if-false (Psalm)        | @psalm-assert-if-false ${1:[assertion]} $${2:var}        |\n| @psalm-ignore-nullable-return (Psalm) | @psalm-ignore-nullable-return                            |\n| @psalm-ignore-falsable-return (Psalm) | @psalm-ignore-falsable-return                            |\n| @psalm-seal-properties (Psalm)        | @psalm-seal-properties                                   |\n| @psalm-internal (Psalm)               | @psalm-internal ${1:Namespace}                           |\n| @psalm-readonly (Psalm)               | @psalm-readonly                                          |\n| @psalm-mutation-free (Psalm)          | @psalm-mutation-free                                     |\n| @psalm-external-mutation-free (Psalm) | @psalm-external-mutation-free                            |\n| @psalm-immutable (Psalm)              | @psalm-immutable                                         |\n| @psalm-pure (Psalm)                   | @psalm-pure                                              |\n| @phan-suppress (Phan)                 | @phan-suppress ${1:IssueName}                            |\n| @suppress (Phan)                      | @suppress ${1:IssueName}                                 |\n| @phan-suppress-current-line (Phan)    | @phan-suppress-current-line ${1:IssueName, IssueName}    |\n| @phan-suppress-next-line (Phan)       | @phan-suppress-next-line ${1:IssueName, IssueName}       |\n| @phan-file-suppress (Phan)            | @phan-file-suppress ${1:IssueName}                       |\n| @override (Phan)                      | @override                                                |\n| @inherits (Phan)                      | @inherits                                                |\n| @phan-assert (Phan)                   | @phan-assert ${1:[assertion]} $${2:var}                  |\n| @phan-assert-true-condition (Phan)    | @phan-assert-true-condition ${1:[assertion]} $${2:var}   |\n| @phan-assert-false-condition (Phan)   | @phan-assert-false-condition ${1:[assertion]} $${2:var}  |\n| @phan-closure-scope (Phan)            | @phan-closure-scope                                      |\n| @phan-read-only (Phan)                | @phan-read-only                                          |\n| @phan-write-only (Phan)               | @phan-write-only                                         |\n| @phan-pure (Phan)                     | @phan-pure                                               |\n| @phan-phan-output-reference (Phan)    | @param ${1:mixed} $${2:name} @phan-phan-output-reference |\n| @phan-phan-ignore-reference (Phan)    | @param ${1:mixed} $${2:name} @phan-phan-ignore-reference |\n| @phan-var (Phan)                      | @phan-var ${1:mixed}                                     |\n| @phan-param (Phan)                    | @phan-param ${1:mixed} $${2:name}                        |\n| @phan-return (Phan)                   | @phan-return ${1:mixed}                                  |\n| @phan-return (Phan)                   | @phan-return ${1:mixed}                                  |\n| @phan-method (Phan)                   | @phan-method ${1:mixed} ${2:methodName()}                |\n| @template (Phan)                      | @template                                                |\n\n## Future development\n\nIt probably wouldn't be too much work to expand this to work with multiple languages. If this is something you are interested in, please pop over to github and add your feedback to the issue [neild3r/vscode-php-docblocker#17](https://github.com/neild3r/vscode-php-docblocker/issues/17).\n\nPlease also feel free to suggest new configuration options, I appreciate at this time the extension is mostly set up for my own DocBlock style requirements but more options could be added for other use cases.\n","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fneild3r%2Fvscode-php-docblocker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fneild3r%2Fvscode-php-docblocker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fneild3r%2Fvscode-php-docblocker/lists"}