{"id":15525373,"url":"https://github.com/ghostwriter/phormat","last_synced_at":"2025-04-23T08:51:59.235Z","repository":{"id":221892617,"uuid":"750030155","full_name":"ghostwriter/phormat","owner":"ghostwriter","description":"[WIP] PHP code formatter.","archived":false,"fork":false,"pushed_at":"2025-04-22T01:02:20.000Z","size":705,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"0.1.x","last_synced_at":"2025-04-22T02:26:45.869Z","etag":null,"topics":["coding-standard","ghostwriter","phormat"],"latest_commit_sha":null,"homepage":"https://github.com/ghostwriter/phormat","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ghostwriter.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":["ghostwriter"]}},"created_at":"2024-01-29T21:17:15.000Z","updated_at":"2025-04-22T01:02:22.000Z","dependencies_parsed_at":"2024-09-17T02:14:41.430Z","dependency_job_id":"d1a3c2d9-fa86-4f06-a569-ece4ddab76ca","html_url":"https://github.com/ghostwriter/phormat","commit_stats":null,"previous_names":["ghostwriter/phormat"],"tags_count":0,"template":false,"template_full_name":"ghostwriter/wip","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghostwriter%2Fphormat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghostwriter%2Fphormat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghostwriter%2Fphormat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghostwriter%2Fphormat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ghostwriter","download_url":"https://codeload.github.com/ghostwriter/phormat/tar.gz/refs/heads/0.1.x","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250403253,"owners_count":21424774,"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":["coding-standard","ghostwriter","phormat"],"created_at":"2024-10-02T10:57:06.503Z","updated_at":"2025-04-23T08:51:59.209Z","avatar_url":"https://github.com/ghostwriter.png","language":"PHP","readme":"# Phormat\n\n[![GitHub Sponsors](https://img.shields.io/github/sponsors/ghostwriter?label=Sponsor+@ghostwriter/phormat\u0026logo=GitHub+Sponsors)](https://github.com/sponsors/ghostwriter)\n[![Automation](https://github.com/ghostwriter/phormat/actions/workflows/automation.yml/badge.svg)](https://github.com/ghostwriter/phormat/actions/workflows/automation.yml)\n[![Supported PHP Version](https://badgen.net/packagist/php/ghostwriter/phormat?color=8892bf)](https://www.php.net/supported-versions)\n[![Downloads](https://badgen.net/packagist/dt/ghostwriter/phormat?color=blue)](https://packagist.org/packages/ghostwriter/phormat)\n\nPHP code formatter.\n\n\u003e [!WARNING]\n\u003e\n\u003e This project is not finished yet, work in progress.\n\n## Installation\n\nYou can install the package via composer:\n\n``` bash\ncomposer require ghostwriter/phormat\n```\n\n### Star ⭐️ this repo if you find it useful\n\nYou can also star (🌟) this repo to find it easier later.\n\n## Usage\n\n```php\nvendor/bin/phormat \u003cpath\u003e --dry-run\n```\n\n## Configuration\n\nwip - work in progress\n\n```php\n\u003c?php\n\ndeclare(strict_types=1);\n\nuse Ghostwriter\\Phormat\\NodeVisitor\\ChangeToShortArrayNodeVisitor;\nuse Ghostwriter\\Phormat\\NodeVisitor\\DeclareStrictTypesNodeVisitor;\nuse Ghostwriter\\Phormat\\NodeVisitor\\ImportFullyQualifiedNamesNodeVisitor;\nuse Ghostwriter\\Phormat\\NodeVisitor\\MakeClosureAndFunctionStaticNodeVisitor;\nuse Ghostwriter\\Phormat\\NodeVisitor\\PERCSNodeVisitor;\nuse Ghostwriter\\Phormat\\NodeVisitor\\SortClassLikeMemberStatementsAlphabeticallyNodeVisitor;\nuse Ghostwriter\\Phormat\\NodeVisitor\\SortClassLikeStatementsAlphabeticallyNodeVisitor;\nuse Ghostwriter\\Phormat\\NodeVisitor\\SortMatchExpressionsAlphabeticallyNodeVisitor;\nuse Ghostwriter\\Phormat\\NodeVisitor\\SortUseStatementsAlphabeticallyNodeVisitor;\nuse Ghostwriter\\Phormat\\PhormatConfig;\n\n/** @var non-empty-string $workingDirectory */\n$workingDirectory = \\getcwd() ?: __DIR__;\n\n/** @psalm-suppress UncaughtThrowInGlobalScope */\nreturn PhormatConfig::new()\n    -\u003evisitors([\n        PERCSNodeVisitor::class,\n        // ChangeToShortArrayNodeVisitor::class,\n        // DeclareStrictTypesNodeVisitor::class,\n        // ImportFullyQualifiedNamesNodeVisitor::class,\n        // MakeClosureAndFunctionStaticNodeVisitor::class,\n        // SortClassLikeMemberStatementsAlphabeticallyNodeVisitor::class,\n        // SortClassLikeStatementsAlphabeticallyNodeVisitor::class,\n        // SortMatchExpressionsAlphabeticallyNodeVisitor::class,\n        // SortUseStatementsAlphabeticallyNodeVisitor::class,\n    ]);\n    -\u003epaths([\n        $workingDirectory . '/bin',\n        $workingDirectory . '/src', \n        $workingDirectory . '/tests'\n    ])\n    -\u003eexclude([\n        PERCSNodeVisitor::class =\u003e [\n            $workingDirectory . '/resources',\n        ],\n        $workingDirectory . '/.cache',\n        $workingDirectory . '/docs',\n        $workingDirectory . '/tests/fixture'\n        $workingDirectory . '/vendor',\n    ]);\n    -\u003ephpVersion(8, 2); // To use a specific PHP version when parsing the code\n```\n\n### Credits\n\n- [Nathanael Esayeas](https://github.com/ghostwriter)\n- [Nikita Popov `nikic/php-parser`](https://github.com/nikic/php-parser)\n- [All Contributors](https://github.com/ghostwriter/phormat/contributors)\n\n### Changelog\n\nPlease see [CHANGELOG.md](./CHANGELOG.md) for more information on what has changed recently.\n\n### License\n\nPlease see [LICENSE](./LICENSE) for more information on the license that applies to this project.\n\n### Security\n\nPlease see [SECURITY.md](./SECURITY.md) for more information on security disclosure process.\n","funding_links":["https://github.com/sponsors/ghostwriter"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fghostwriter%2Fphormat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fghostwriter%2Fphormat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fghostwriter%2Fphormat/lists"}