{"id":20180565,"url":"https://github.com/ergebnis/rector-rules","last_synced_at":"2025-04-10T04:57:34.423Z","repository":{"id":197372908,"uuid":"698524581","full_name":"ergebnis/rector-rules","owner":"ergebnis","description":"👓 Provides a composer package with rules for rector/rector.","archived":false,"fork":false,"pushed_at":"2024-05-27T23:44:46.000Z","size":678,"stargazers_count":6,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-05-28T08:56:10.438Z","etag":null,"topics":["rector","rules"],"latest_commit_sha":null,"homepage":null,"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/ergebnis.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":".github/SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["ergebnis","localheinz"]}},"created_at":"2023-09-30T07:02:49.000Z","updated_at":"2024-05-30T01:47:11.341Z","dependencies_parsed_at":null,"dependency_job_id":"9798dca7-d23c-43fe-b83a-2a54e5e3006b","html_url":"https://github.com/ergebnis/rector-rules","commit_stats":null,"previous_names":["ergebnis/rector-rules"],"tags_count":6,"template":false,"template_full_name":"ergebnis/php-package-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ergebnis%2Frector-rules","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ergebnis%2Frector-rules/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ergebnis%2Frector-rules/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ergebnis%2Frector-rules/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ergebnis","download_url":"https://codeload.github.com/ergebnis/rector-rules/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248161264,"owners_count":21057554,"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":["rector","rules"],"created_at":"2024-11-14T02:31:43.931Z","updated_at":"2025-04-10T04:57:34.410Z","avatar_url":"https://github.com/ergebnis.png","language":"PHP","funding_links":["https://github.com/sponsors/ergebnis","https://github.com/sponsors/localheinz"],"categories":[],"sub_categories":[],"readme":"# rector-rules\n\n[![Integrate](https://github.com/ergebnis/rector-rules/workflows/Integrate/badge.svg)](https://github.com/ergebnis/rector-rules/actions)\n[![Merge](https://github.com/ergebnis/rector-rules/workflows/Merge/badge.svg)](https://github.com/ergebnis/rector-rules/actions)\n[![Release](https://github.com/ergebnis/rector-rules/workflows/Release/badge.svg)](https://github.com/ergebnis/rector-rules/actions)\n[![Renew](https://github.com/ergebnis/rector-rules/workflows/Renew/badge.svg)](https://github.com/ergebnis/rector-rules/actions)\n\n[![Code Coverage](https://codecov.io/gh/ergebnis/rector-rules/branch/main/graph/badge.svg)](https://codecov.io/gh/ergebnis/rector-rules)\n\n[![Latest Stable Version](https://poser.pugx.org/ergebnis/rector-rules/v/stable)](https://packagist.org/packages/ergebnis/rector-rules)\n[![Total Downloads](https://poser.pugx.org/ergebnis/rector-rules/downloads)](https://packagist.org/packages/ergebnis/rector-rules)\n[![Monthly Downloads](http://poser.pugx.org/ergebnis/rector-rules/d/monthly)](https://packagist.org/packages/ergebnis/rector-rules)\n\nThis project provides a [`composer`](https://getcomposer.org) package with rules for [`rector/rector`](https://github.com/rectorphp/rector).\n\n## Installation\n\nRun\n\n```sh\ncomposer require --dev ergebnis/rector-rules\n```\n\n## Usage\n\n### Rules\n\nThis project provides the following rules for [`rector/rector`](https://github.com/rectorphp/rector):\n\n- [`Ergebnis\\Rector\\Rules\\Arrays\\SortAssociativeArrayByKeyRector`](https://github.com/ergebnis/rector-rules#arrayssortassociativearraybykeyrector)\n\n#### `Arrays\\SortAssociativeArrayByKeyRector`\n\nThis rule sorts associative arrays in ascending order by key unless they are declared in classes extending `PHPUnit\\Framework\\TestCase`.\n\n```diff\n \u003c?php\n\n $data = [\n+    'bar' =\u003e [\n+        'quux' =\u003e 'quuz',\n+        'quz' =\u003e 'qux',\n+    ],\n     'foo' =\u003e [\n         'foo',\n         'bar',\n         'baz',\n     ],\n-    'bar' =\u003e [\n-        'quz' =\u003e 'qux',\n-        'quux' =\u003e 'quuz',\n-    ],\n ];\n```\n\n## Changelog\n\nThe maintainers of this project record notable changes to this project in a [changelog](CHANGELOG.md).\n\n## Contributing\n\nThe maintainers of this project suggest following the [contribution guide](.github/CONTRIBUTING.md).\n\n## Code of Conduct\n\nThe maintainers of this project ask contributors to follow the [code of conduct](https://github.com/ergebnis/.github/blob/main/CODE_OF_CONDUCT.md).\n\n## General Support Policy\n\nThe maintainers of this project provide limited support.\n\nYou can support the maintenance of this project by [sponsoring @localheinz](https://github.com/sponsors/localheinz) or [requesting an invoice for services related to this project](mailto:am@localheinz.com?subject=ergebnis/rector-rules:%20Requesting%20invoice%20for%20services).\n\n## PHP Version Support Policy\n\nThis project supports PHP versions with [active and security support](https://www.php.net/supported-versions.php).\n\nThe maintainers of this project add support for a PHP version following its initial release and drop support for a PHP version when it has reached the end of security support.\n\n## Security Policy\n\nThis project has a [security policy](.github/SECURITY.md).\n\n## License\n\nThis project uses the [MIT license](LICENSE.md).\n\n## Social\n\nFollow [@localheinz](https://twitter.com/intent/follow?screen_name=localheinz) and [@ergebnis](https://twitter.com/intent/follow?screen_name=ergebnis) on Twitter.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fergebnis%2Frector-rules","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fergebnis%2Frector-rules","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fergebnis%2Frector-rules/lists"}