{"id":35495485,"url":"https://github.com/guanguans/rector-rules","last_synced_at":"2026-01-19T08:06:10.833Z","repository":{"id":330711817,"uuid":"1123615811","full_name":"guanguans/rector-rules","owner":"guanguans","description":"A set of rector/rector rules. - 一套 rector/rector 规则。","archived":false,"fork":false,"pushed_at":"2026-01-14T05:18:07.000Z","size":187,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-01-14T09:15:49.942Z","etag":null,"topics":["dev","format","formatter","lint","linter","rector","refactor","rule","standard","static-analysis","testing"],"latest_commit_sha":null,"homepage":"","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/guanguans.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":".github/CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":".github/SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"custom":"https://guanguans.github.io/sponsors"}},"created_at":"2025-12-27T08:47:21.000Z","updated_at":"2026-01-14T05:18:12.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/guanguans/rector-rules","commit_stats":null,"previous_names":["guanguans/rector-rules"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/guanguans/rector-rules","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guanguans%2Frector-rules","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guanguans%2Frector-rules/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guanguans%2Frector-rules/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guanguans%2Frector-rules/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/guanguans","download_url":"https://codeload.github.com/guanguans/rector-rules/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guanguans%2Frector-rules/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28491869,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-17T00:50:05.742Z","status":"ssl_error","status_checked_at":"2026-01-17T00:43:11.982Z","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":["dev","format","formatter","lint","linter","rector","refactor","rule","standard","static-analysis","testing"],"created_at":"2026-01-03T17:13:06.410Z","updated_at":"2026-01-17T01:56:07.691Z","avatar_url":"https://github.com/guanguans.png","language":"PHP","readme":"# rector-rules\n\n\u003e [!NOTE]\n\u003e A set of additional rules for rector/rector. - 一套针对 `rector/rector` 的附加规则。\n\n[![tests](https://github.com/guanguans/rector-rules/actions/workflows/tests.yml/badge.svg)](https://github.com/guanguans/rector-rules/actions/workflows/tests.yml)\n[![php-cs-fixer](https://github.com/guanguans/rector-rules/actions/workflows/php-cs-fixer.yml/badge.svg)](https://github.com/guanguans/rector-rules/actions/workflows/php-cs-fixer.yml)\n[![codecov](https://codecov.io/gh/guanguans/rector-rules/graph/badge.svg?token=0RtgSGom4K)](https://codecov.io/gh/guanguans/rector-rules)\n[![Latest Stable Version](https://poser.pugx.org/guanguans/rector-rules/v)](https://packagist.org/packages/guanguans/rector-rules)\n[![GitHub release (with filter)](https://img.shields.io/github/v/release/guanguans/rector-rules)](https://github.com/guanguans/rector-rules/releases)\n[![Total Downloads](https://poser.pugx.org/guanguans/rector-rules/downloads)](https://packagist.org/packages/guanguans/rector-rules)\n[![License](https://poser.pugx.org/guanguans/rector-rules/license)](https://packagist.org/packages/guanguans/rector-rules)\n\n## Requirement\n\n* PHP \u003e= 7.4\n\n## Installation\n\n```shell\ncomposer require guanguans/rector-rules --dev --ansi -v\n```\n\n## Usage\n\n### :monocle_face: [Rules Overview](docs/rules-overview.md)\n\n### In your rector configuration register rules\n\n```php\nuse Guanguans\\RectorRules\\Rector\\File\\SortFileFunctionStmtRector;\nuse Guanguans\\RectorRules\\Rector\\Name\\RenameToPsrNameRector;\nuse PhpParser\\NodeVisitor\\ParentConnectingVisitor;\nuse Rector\\Config\\RectorConfig;\n\nreturn RectorConfig::configure()\n    -\u003eregisterDecoratingNodeVisitor(ParentConnectingVisitor::class)\n    -\u003ewithConfiguredRule(RenameToPsrNameRector::class, [\n        'assertMatches*Snapshot',\n        'beforeEach',\n        'PDO',\n    ])\n    // ...\n    -\u003ewithRules([\n        SortFileFunctionStmtRector::class,\n        // ...\n    ]);\n```\n\n## Composer scripts\n\n```shell\ncomposer checks:required\ncomposer php-cs-fixer:fix\ncomposer test\n```\n\n## Changelog\n\nPlease see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.\n\n## Contributing\n\nPlease see [CONTRIBUTING](.github/CONTRIBUTING.md) for details.\n\n## Security Vulnerabilities\n\nPlease review [our security policy](../../security/policy) on how to report security vulnerabilities.\n\n## Credits\n\n* [guanguans](https://github.com/guanguans)\n* [All Contributors](../../contributors)\n\n## License\n\nThe MIT License (MIT). Please see [License File](LICENSE) for more information.\n","funding_links":["https://guanguans.github.io/sponsors"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fguanguans%2Frector-rules","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fguanguans%2Frector-rules","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fguanguans%2Frector-rules/lists"}