{"id":13650536,"url":"https://github.com/silverleague/silverstripe-ideannotator","last_synced_at":"2025-04-13T00:47:33.037Z","repository":{"id":34895598,"uuid":"38925363","full_name":"silverleague/silverstripe-ideannotator","owner":"silverleague","description":"Generate docblocks for DataObjects, Page, PageControllers and (Data)Extensions","archived":false,"fork":false,"pushed_at":"2025-01-02T23:35:52.000Z","size":363,"stargazers_count":46,"open_issues_count":7,"forks_count":24,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-13T00:47:26.742Z","etag":null,"topics":["code-generator","code-quality","dataobject","docblock","hacktoberfest","helper","improvement","packagist","phpstorm","rick-and-morty","silverleague-modules","silverstripe","silverstripe-4","silverstripe-ideannotator","vscode"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/silverleague.png","metadata":{"files":{"readme":"README.md","changelog":"Changelog.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-07-11T12:43:20.000Z","updated_at":"2025-01-02T23:35:56.000Z","dependencies_parsed_at":"2023-12-04T22:27:19.450Z","dependency_job_id":"7b8fd6b6-5c47-41ed-987d-8eb6f2a2b898","html_url":"https://github.com/silverleague/silverstripe-ideannotator","commit_stats":{"total_commits":242,"total_committers":22,"mean_commits":11.0,"dds":0.6363636363636364,"last_synced_commit":"d149775600edd6550f3a5822a3c51dbb6ce3a259"},"previous_names":[],"tags_count":38,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/silverleague%2Fsilverstripe-ideannotator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/silverleague%2Fsilverstripe-ideannotator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/silverleague%2Fsilverstripe-ideannotator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/silverleague%2Fsilverstripe-ideannotator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/silverleague","download_url":"https://codeload.github.com/silverleague/silverstripe-ideannotator/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248650434,"owners_count":21139672,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["code-generator","code-quality","dataobject","docblock","hacktoberfest","helper","improvement","packagist","phpstorm","rick-and-morty","silverleague-modules","silverstripe","silverstripe-4","silverstripe-ideannotator","vscode"],"created_at":"2024-08-02T02:00:37.631Z","updated_at":"2025-04-13T00:47:33.003Z","avatar_url":"https://github.com/silverleague.png","language":"PHP","funding_links":[],"categories":["Very Useful Modules"],"sub_categories":["Development Helpers"],"readme":"# silverstripe-ideannotator\n\n[![Scrutinizer](https://img.shields.io/scrutinizer/g/silverleague/silverstripe-ideannotator.svg)](https://scrutinizer-ci.com/g/silverleague/silverstripe-ideannotator/)\n[![Travis](https://img.shields.io/travis/silverleague/silverstripe-ideannotator.svg)](https://travis-ci.org/silverleague/silverstripe-ideannotator)\n[![codecov](https://codecov.io/gh/silverleague/silverstripe-ideannotator/branch/master/graph/badge.svg)](https://codecov.io/gh/silverleague/silverstripe-ideannotator)\n[![Packagist](https://img.shields.io/packagist/dt/silverleague/ideannotator.svg)](https://packagist.org/packages/silverleague/ideannotator)\n[![Packagist](https://img.shields.io/packagist/v/silverleague/ideannotator.svg)](https://packagist.org/packages/silverleague/ideannotator)\n[![Packagist Pre Release](https://img.shields.io/packagist/vpre/silverleague/ideannotator.svg)](https://packagist.org/packages/silverleague/ideannotator)\n\n\nThis module generates @property, @method and @mixin tags for DataObjects, PageControllers and (Data)Extensions, so ide's like PHPStorm recognize the database and relations that are set in the $db, $has_one, $has_many and $many_many arrays.\n\nThe docblocks can be generated/updated with each dev/build and with a DataObjectAnnotatorTask per module or classname.\n\n## Requirements\n\nSilverStripe Framework and possible custom code.\n\nBy default, `mysite` and `app` are enabled \"modules\".\n\n### Version ^2:\nSilverStripe 3.x framework\n\n### Version ^3:\nSilverStripe 4.x+\n\n## Installation\n\n```json\n{\n  \"require-dev\": {\n    \"silverleague/ideannotator\": \"3.x-dev\"\n  }\n}\n```\nPlease note, this example omitted any possible modules you require yourself!\n\n## Example result\n\n```php\n\u003c?php\n\n/**\n * Class NewsItem\n *\n * @property string $Title\n * @property int $Sort\n * @property int $Version\n * @property int $AuthorID\n * @method \\SilverStripe\\Security\\Member Author()\n * @method \\SilverStripe\\ORM\\DataList|Category[] Categories()\n * @method \\SilverStripe\\ORM\\ManyManyList|Tag[] Tags()\n * @mixin Versioned\n */\nclass NewsItem extends \\SilverStripe\\ORM\\DataObject\n{\n    private static $db = array(\n        'Title'\t=\u003e 'Varchar(255)',\n        'Sort'\t=\u003e 'Int'\n    );\n\n    private static $has_one = array(\n        'Author' =\u003e Member::class\n    );\n\n    private static $has_many = array(\n        'Categories' =\u003e Category::class\n    );\n\n    private static $many_many = array(\n        'Tags' =\u003e Tag::class\n    );\n}\n```\n\n## Further information\nFor installation, see [installation](docs/en/Installation.md)\n\nFor the Code of Conduct, see [CodeOfConduct](docs/en/CodeOfConduct.md)\n\nFor contributing, see [Contributing](CONTRIBUTING.md)\n\nFor further documentation information, see the [docs](docs/en/Index.md)\n\n## A word of caution\nThis module changes the content of your files and currently there is no backup functionality. PHPStorm has a Local history for files and of course you have your code version controlled...\nI tried to add complete UnitTests, but I can't garantuee every situation is covered.\n\nWindows users should be aware that the PHP Docs are generated with PSR in mind and use \\n for line endings rather than Window's \\r\\n, some editors may have a hard time with these line endings.\n\nThis module should **never** be installed on a production environment.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsilverleague%2Fsilverstripe-ideannotator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsilverleague%2Fsilverstripe-ideannotator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsilverleague%2Fsilverstripe-ideannotator/lists"}