{"id":14987357,"url":"https://github.com/codeigniter/phpstan-codeigniter","last_synced_at":"2025-05-12T17:25:27.874Z","repository":{"id":181429669,"uuid":"666301008","full_name":"CodeIgniter/phpstan-codeigniter","owner":"CodeIgniter","description":"CodeIgniter extensions and rules for PHPStan","archived":false,"fork":false,"pushed_at":"2025-05-03T15:13:45.000Z","size":254,"stargazers_count":17,"open_issues_count":5,"forks_count":1,"subscribers_count":7,"default_branch":"1.x","last_synced_at":"2025-05-03T16:34:57.492Z","etag":null,"topics":["codeigniter","codeigniter4","php","phpstan-extension","static-analysis"],"latest_commit_sha":null,"homepage":"https://codeigniter.com/","language":"PHP","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/CodeIgniter.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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,"zenodo":null}},"created_at":"2023-07-14T07:16:13.000Z","updated_at":"2025-05-03T15:13:48.000Z","dependencies_parsed_at":"2023-12-21T06:29:47.168Z","dependency_job_id":"55b629e7-c08c-4b92-b3b2-1e5d4a47040d","html_url":"https://github.com/CodeIgniter/phpstan-codeigniter","commit_stats":{"total_commits":100,"total_committers":2,"mean_commits":50.0,"dds":"0.050000000000000044","last_synced_commit":"534ee638ddd7e5382261338102df03dd53593fee"},"previous_names":["codeigniter/phpstan-codeigniter"],"tags_count":27,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodeIgniter%2Fphpstan-codeigniter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodeIgniter%2Fphpstan-codeigniter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodeIgniter%2Fphpstan-codeigniter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodeIgniter%2Fphpstan-codeigniter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CodeIgniter","download_url":"https://codeload.github.com/CodeIgniter/phpstan-codeigniter/tar.gz/refs/heads/1.x","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253785812,"owners_count":21964031,"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":["codeigniter","codeigniter4","php","phpstan-extension","static-analysis"],"created_at":"2024-09-24T14:14:29.909Z","updated_at":"2025-05-12T17:25:27.862Z","avatar_url":"https://github.com/CodeIgniter.png","language":"PHP","readme":"# CodeIgniter extensions and rules for PHPStan\n\n[![Extension Tests](https://github.com/CodeIgniter/phpstan-codeigniter/actions/workflows/test-phpunit.yml/badge.svg)](https://github.com/CodeIgniter/phpstan-codeigniter/actions/workflows/test-phpunit.yml)\n[![Coding Standards Check](https://github.com/CodeIgniter/phpstan-codeigniter/actions/workflows/test-coding-standards.yml/badge.svg)](https://github.com/CodeIgniter/phpstan-codeigniter/actions/workflows/test-coding-standards.yml)\n[![PHPStan Static Analysis](https://github.com/CodeIgniter/phpstan-codeigniter/actions/workflows/test-phpstan.yml/badge.svg)](https://github.com/CodeIgniter/phpstan-codeigniter/actions/workflows/test-phpstan.yml)\n\n* [PHPStan](https://phpstan.org/)\n* [CodeIgniter](https://codeigniter.com/)\n\nThis extension provides the following features:\n\n* [Type inference](docs/type-inference.md)\n\n### Rules\n\n* Checks if the string argument passed to `config()` or `model()` function is a valid class string extending\n`CodeIgniter\\Config\\BaseConfig` or `CodeIgniter\\Model`, respectively. This can be turned off by setting\n`codeigniter.checkArgumentTypeOfFactories: false` in your `phpstan.neon`. For fine-grained control, you can\nindividually choose which factory function to disable using `codeigniter.checkArgumentTypeOfConfig` and\n`codeigniter.checkArgumentTypeOfModel`. **NOTE:** Setting `codeigniter.checkArgumentTypeOfFactories: false` will effectively\nbypass the two specific options.\n* Checks if the string argument passed to `service()` or `single_service()` function is a valid service name. This can be turned off by setting `codeigniter.checkArgumentTypeOfServices: false` in your `phpstan.neon`.\n* Disallows instantiating cache handlers using `new` and suggests to use the `CacheFactory` class instead.\n* Disallows instantiating `FrameworkException` classes using `new`.\n* Disallows direct re-assignment or access of `$_SERVER` and `$_GET` and suggests to use the `Superglobals` class instead.\n* Disallows use of `::class` fetch on `config()` and `model()` and suggests to use the short form of the class instead.\n\n## Installation\n\nTo use this extension, require it in [Composer](https://getcomposer.org/):\n\n```\ncomposer require --dev codeigniter/phpstan-codeigniter\n```\n\nIf you also install [phpstan/extension-installer](https://github.com/phpstan/extension-installer) then you're all set!\n\n\u003cdetails\u003e\n\t\u003csummary\u003eManual installation\u003c/summary\u003e\n\nIf you don't want to use `phpstan/extension-installer`, include extension.neon in your project's PHPStan config:\n\n```yml\nincludes:\n    - vendor/codeigniter/phpstan-codeigniter/extension.neon\n```\n\n\u003c/details\u003e\n\n## Contributing\n\nAny contributions are welcome.\n\nIf you want to see a new rule or extension specific to CodeIgniter, please open a\n[feature request](https://github.com/CodeIgniter/phpstan-codeigniter/issues/new?assignees=\u0026labels=feature+request\u0026projects=\u0026template=feature_request.yml). If you can contribute the code yourself, please open a pull request instead.\n\nBefore reporting any bugs, please check if the bug occurs only if using this extension with PHPStan. If the bug is\nreproducible in PHPStan alone, please open a bug report there instead. Thank you!\n\n## License\n\nPHPStan CodeIgniter is an open source library licensed under [MIT](LICENSE).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodeigniter%2Fphpstan-codeigniter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodeigniter%2Fphpstan-codeigniter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodeigniter%2Fphpstan-codeigniter/lists"}