{"id":17111018,"url":"https://github.com/mteu/docblock-rules","last_synced_at":"2026-03-27T04:56:58.034Z","repository":{"id":152720827,"uuid":"626912143","full_name":"mteu/docblock-rules","owner":"mteu","description":"Simple PHPStan rules extension to verify whether the PHP files contain certain pre-defined strings.","archived":false,"fork":false,"pushed_at":"2025-04-11T01:51:58.000Z","size":382,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-13T03:57:41.142Z","etag":null,"topics":["phpstan","phpstan-extension"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mteu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2023-04-12T12:08:45.000Z","updated_at":"2025-04-11T01:51:42.000Z","dependencies_parsed_at":"2023-10-01T16:43:16.394Z","dependency_job_id":"9db314aa-225c-4d07-8504-d0f3efb17fc1","html_url":"https://github.com/mteu/docblock-rules","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mteu%2Fdocblock-rules","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mteu%2Fdocblock-rules/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mteu%2Fdocblock-rules/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mteu%2Fdocblock-rules/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mteu","download_url":"https://codeload.github.com/mteu/docblock-rules/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248661705,"owners_count":21141450,"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":["phpstan","phpstan-extension"],"created_at":"2024-10-14T16:48:20.026Z","updated_at":"2026-03-27T04:56:53.007Z","avatar_url":"https://github.com/mteu.png","language":"PHP","readme":"\u003cdiv align=\"center\"\u003e\n\n[![CGL](https://github.com/mteu/docblock-rules/actions/workflows/cgl.yaml/badge.svg)](https://github.com/mteu/docblock-rules/actions/workflows/cgl.yaml)\n[![Tests](https://github.com/mteu/docblock-rules/actions/workflows/tests.yaml/badge.svg)](https://github.com/mteu/docblock-rules/actions/workflows/tests.yaml)\n\n# DocBlock Rules\n\u003c/div\u003e\n\n**DocBlock Rules** is simple [PHPStan](https://github.com/phpstan/phpstan) rules extension to verify whether the PHP files\ncontain certain pre-defined strings.\n\n## ⚡ Usage\n\nRequire this package and make sure to configure PHPStan according to your needs by putting a configuration file in your project\n(e.g. as `phpstan.neon` file in your package root.)\n\n```bash\ncomposer require --dev mteu/docblock-rules\n```\n\nIf you're using the [`phpstan/extension-installer`](https://github.com/phpstan/extension-installer) you're good to go.\n\n## Configuration\n\nThis package ships custom rules that need additional configuration:\n* [`RequireCopyrightInformationInFirstCommentRule`](#RequireCopyrightInformationInFirstCommentRule)\n* [`RequireLicenseInformationInFirstCommentRule`](#RequireLicenseInformationInFirstCommentRule)\n\n### [`RequireCopyrightInformationInFirstCommentRule`](src/Rules/RequireCopyrightInformationInFirstCommentRule.php)\nThis rule checks whether there is a PHPDoc comment block present that contains copyright information\nidentified by a needle string in the PHPStan configuration.\n\n#### Sample configuration:\n```neon\n# phpstan.neon\n\nparameters:\n    docblock:\n        copyrightIdentifier: 'Copyright (C) 2023'\n```\n\n### [`RequireLicenseInformationInFirstCommentRule`](src/Rules/RequireLicenseInformationInFirstCommentRule.php)\nThis rule checks whether there is a PHPDoc comment block present that contains license information. You\ncan use pre-defined license checks values or define a custom string that is being looked for.\n\n#### Sample configuration:\n```neon\n# phpstan.neon\n\nparameters:\n    docblock:\n        # Pre-configured checks when applying 'GPL-2.0' or 'GPL-3.0' as value.\n        # Alternatively, use a custom string to look for in the file.\n        requiredLicenseIdentifier: 'GPL-3.0'\n```\n\n## 💛 Acknowledgement\nI'm very grateful for the good people that created, maintain and sponsor [PHPStan](https://github.com/phpstan/phpstan). Děkuji, [Ondřej](https://github.com/ondrejmirtes)\nand everyone who has contributed!\n\n## ⭐ License\nThis project is licensed under [GNU General Public License 3.0 (or later)](LICENSE).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmteu%2Fdocblock-rules","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmteu%2Fdocblock-rules","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmteu%2Fdocblock-rules/lists"}