gossi/php-code-formatter
gossi/php-code-formatter is a PHP library for formatting PHP source code. It parses code into a token stream and applies configurable formatting rules, letting you enforce a consistent style programmatically or from the command line.
gossi/php-code-formatter is a framework-agnostic PHP formatting library, so it does not assume Laravel conventions. In a Laravel codebase it fits best as an isolated developer-tooling or code-generation utility behind an application service or Artisan command, not as a request-path dependency. It is a poor fit for user-facing runtime formatting unless the input is tightly controlled.tokenizer. Confirm behavior on Laravel-generated code, Blade-adjacent PHP snippets, attributes, enums, readonly properties, and heredocs. Pin the package version and commit lockfile changes deliberately.How can I help you explore Laravel packages today?