Download the PHP package guanguans/php-cs-fixer-custom-fixers without Composer
On this page you can find all versions of the php package guanguans/php-cs-fixer-custom-fixers. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download guanguans/php-cs-fixer-custom-fixers
More information about guanguans/php-cs-fixer-custom-fixers
Files in guanguans/php-cs-fixer-custom-fixers
Package php-cs-fixer-custom-fixers
Short Description Use php-cs-fixer to format bats,blade.php,Dockerfile,env,json,md,mdx,sh,sql,tex,text,toml,txt,xml,yaml...files. - 使用 php-cs-fixer 去格式化 bats、blade.php、Dockerfile、env、json、md、mdx、sh、sql、tex、text、toml、txt、xml、yaml...文件。
License MIT
Homepage https://github.com/guanguans/php-cs-fixer-custom-fixers
Informations about the package php-cs-fixer-custom-fixers
php-cs-fixer-custom-fixers
[!NOTE] Use php-cs-fixer to format bats,blade.php,Dockerfile,env,json,md,mdx,sh,sql,tex,text,toml,txt,xml,yaml...files. - 使用 php-cs-fixer 去格式化 bats、blade.php、Dockerfile、env、json、md、mdx、sh、sql、tex、text、toml、txt、xml、yaml...文件。 A set of custom fixers for friendsofphp/php-cs-fixer. - 一套针对
friendsofphp/php-cs-fixer的自定义修复器。
Requirement
- PHP >= 7.4
Installation
Usage
In your php-cs-fixer configuration(sample) register fixers and use them
Run php-cs-fixer
Fixers
AutocorrectFixer
Format `txt` files using [`autocorrect`](https://github.com/huacnlee/autocorrect). Risky: it depends on the configuration of `autocorrect`. Configuration options: - `command` (`string[]`): the command to run and its arguments listed as separate entries; defaults to `['autocorrect']` - `cwd` (`string`, `null`): the working directory or null to use the working dir of the current PHP process; defaults to `null` - `env` (`array`): the environment variables or null to use the same environment as the current PHP process; defaults to `[]` - `extensions` (`string[]`): the supported file extensions are used for formatting; defaults to `['txt', 'text', 'md', 'markdown', 'mdx', 'tex']` - `input` (`string`, `null`): the input as stream resource, scalar or \Traversable, or null for no input; defaults to `null` - `options` (`array`): the command options to run listed as separate entries; defaults to `[]` - `single_blank_line_at_eof` (`'\n'`, `'\r\n'`, `null`): the line ending to use at the end of the file; defaults to `null` - `skip_paths` (`string[]`): list of paths to skip; defaults to `[]` - `timeout` (`float`, `int`, `null`): the timeout in seconds or null to disable; defaults to `10` Sample1: configuration(`default`) Sample2: configuration(`['options' => ['--type' => 'txt']]`)BladeFormatterFixer
Format `blade.php` files using [`blade-formatter`](https://github.com/shufo/blade-formatter). Risky: it depends on the configuration of `blade-formatter`. Configuration options: - `command` (`string[]`): the command to run and its arguments listed as separate entries; defaults to `['blade-formatter']` - `cwd` (`string`, `null`): the working directory or null to use the working dir of the current PHP process; defaults to `null` - `env` (`array`): the environment variables or null to use the same environment as the current PHP process; defaults to `[]` - `extensions` (`string[]`): the supported file extensions are used for formatting; defaults to `['blade.php']` - `input` (`string`, `null`): the input as stream resource, scalar or \Traversable, or null for no input; defaults to `null` - `options` (`array`): the command options to run listed as separate entries; defaults to `[]` - `single_blank_line_at_eof` (`'\n'`, `'\r\n'`, `null`): the line ending to use at the end of the file; defaults to `null` - `skip_paths` (`string[]`): list of paths to skip; defaults to `[]` - `timeout` (`float`, `int`, `null`): the timeout in seconds or null to disable; defaults to `10` Sample1: configuration(`default`) Sample2: configuration(`['options' => ['--indent-size' => 2, '--extra-liners' => true]]`)DockerfmtFixer
Format `Dockerfile` files using [`dockerfmt`](https://github.com/reteps/dockerfmt). Risky: it depends on the configuration of `dockerfmt`. Configuration options: - `command` (`string[]`): the command to run and its arguments listed as separate entries; defaults to `['dockerfmt']` - `cwd` (`string`, `null`): the working directory or null to use the working dir of the current PHP process; defaults to `null` - `env` (`array`): the environment variables or null to use the same environment as the current PHP process; defaults to `[]` - `extensions` (`string[]`): the supported file extensions are used for formatting; defaults to `['Dockerfile']` - `input` (`string`, `null`): the input as stream resource, scalar or \Traversable, or null for no input; defaults to `null` - `options` (`array`): the command options to run listed as separate entries; defaults to `[]` - `single_blank_line_at_eof` (`'\n'`, `'\r\n'`, `null`): the line ending to use at the end of the file; defaults to `null` - `skip_paths` (`string[]`): list of paths to skip; defaults to `[]` - `timeout` (`float`, `int`, `null`): the timeout in seconds or null to disable; defaults to `10` Sample1: configuration(`default`) Sample2: configuration(`['options' => ['--indent' => 2]]`)DotenvLinterFixer
Format `env` files using [`dotenv-linter`](https://github.com/dotenv-linter/dotenv-linter). Risky: it depends on the configuration of `dotenv-linter`. Configuration options: - `command` (`string[]`): the command to run and its arguments listed as separate entries; defaults to `['dotenv-linter', 'fix']` - `cwd` (`string`, `null`): the working directory or null to use the working dir of the current PHP process; defaults to `null` - `env` (`array`): the environment variables or null to use the same environment as the current PHP process; defaults to `[]` - `extensions` (`string[]`): the supported file extensions are used for formatting; defaults to `['env', 'env.example']` - `input` (`string`, `null`): the input as stream resource, scalar or \Traversable, or null for no input; defaults to `null` - `options` (`array`): the command options to run listed as separate entries; defaults to `[]` - `single_blank_line_at_eof` (`'\n'`, `'\r\n'`, `null`): the line ending to use at the end of the file; defaults to `null` - `skip_paths` (`string[]`): list of paths to skip; defaults to `[]` - `timeout` (`float`, `int`, `null`): the timeout in seconds or null to disable; defaults to `10` Sample1: configuration(`default`) Sample2: configuration(`['options' => ['--plain' => true]]`) Sample3: configuration(`['options' => ['--plain' => true]]`)LintMdFixer
Format `md` files using [`lint-md`](https://github.com/lint-md/lint-md). Risky: it depends on the configuration of `lint-md`. Configuration options: - `command` (`string[]`): the command to run and its arguments listed as separate entries; defaults to `['lint-md']` - `cwd` (`string`, `null`): the working directory or null to use the working dir of the current PHP process; defaults to `null` - `env` (`array`): the environment variables or null to use the same environment as the current PHP process; defaults to `[]` - `extensions` (`string[]`): the supported file extensions are used for formatting; defaults to `['md', 'markdown']` - `input` (`string`, `null`): the input as stream resource, scalar or \Traversable, or null for no input; defaults to `null` - `options` (`array`): the command options to run listed as separate entries; defaults to `[]` - `single_blank_line_at_eof` (`'\n'`, `'\r\n'`, `null`): the line ending to use at the end of the file; defaults to `null` - `skip_paths` (`string[]`): list of paths to skip; defaults to `[]` - `timeout` (`float`, `int`, `null`): the timeout in seconds or null to disable; defaults to `10` Sample1: configuration(`default`) Sample2: configuration(`['options' => ['--suppress-warnings' => true]]`)MarkdownlintCli2Fixer
Format `md` files using [`markdownlint-cli2`](https://github.com/DavidAnson/markdownlint-cli2). Risky: it depends on the configuration of `markdownlint-cli2`. Configuration options: - `command` (`string[]`): the command to run and its arguments listed as separate entries; defaults to `['markdownlint-cli2']` - `cwd` (`string`, `null`): the working directory or null to use the working dir of the current PHP process; defaults to `null` - `env` (`array`): the environment variables or null to use the same environment as the current PHP process; defaults to `[]` - `extensions` (`string[]`): the supported file extensions are used for formatting; defaults to `['md', 'markdown']` - `input` (`string`, `null`): the input as stream resource, scalar or \Traversable, or null for no input; defaults to `null` - `options` (`array`): the command options to run listed as separate entries; defaults to `[]` - `single_blank_line_at_eof` (`'\n'`, `'\r\n'`, `null`): the line ending to use at the end of the file; defaults to `null` - `skip_paths` (`string[]`): list of paths to skip; defaults to `[]` - `timeout` (`float`, `int`, `null`): the timeout in seconds or null to disable; defaults to `10` Sample1: configuration(`default`) Sample2: configuration(`['options' => ['--no-globs' => true]]`)MarkdownlintFixer
Format `md` files using [`markdownlint`](https://github.com/igorshubovych/markdownlint-cli). Risky: it depends on the configuration of `markdownlint`. Configuration options: - `command` (`string[]`): the command to run and its arguments listed as separate entries; defaults to `['markdownlint']` - `cwd` (`string`, `null`): the working directory or null to use the working dir of the current PHP process; defaults to `null` - `env` (`array`): the environment variables or null to use the same environment as the current PHP process; defaults to `[]` - `extensions` (`string[]`): the supported file extensions are used for formatting; defaults to `['md', 'markdown']` - `input` (`string`, `null`): the input as stream resource, scalar or \Traversable, or null for no input; defaults to `null` - `options` (`array`): the command options to run listed as separate entries; defaults to `[]` - `single_blank_line_at_eof` (`'\n'`, `'\r\n'`, `null`): the line ending to use at the end of the file; defaults to `null` - `skip_paths` (`string[]`): list of paths to skip; defaults to `[]` - `timeout` (`float`, `int`, `null`): the timeout in seconds or null to disable; defaults to `10` Sample1: configuration(`default`) Sample2: configuration(`['options' => ['--dot' => true]]`)PintFixer
Format `php` files using [`pint`](https://github.com/laravel/pint). Risky: it depends on the configuration of `pint`. Configuration options: - `command` (`string[]`): the command to run and its arguments listed as separate entries; defaults to `['php', 'vendor/bin/pint']` - `cwd` (`string`, `null`): the working directory or null to use the working dir of the current PHP process; defaults to `null` - `env` (`array`): the environment variables or null to use the same environment as the current PHP process; defaults to `[]` - `extensions` (`string[]`): the supported file extensions are used for formatting; defaults to `['php']` - `input` (`string`, `null`): the input as stream resource, scalar or \Traversable, or null for no input; defaults to `null` - `options` (`array`): the command options to run listed as separate entries; defaults to `[]` - `single_blank_line_at_eof` (`'\n'`, `'\r\n'`, `null`): the line ending to use at the end of the file; defaults to `null` - `skip_paths` (`string[]`): list of paths to skip; defaults to `[]` - `timeout` (`float`, `int`, `null`): the timeout in seconds or null to disable; defaults to `10`ShfmtFixer
Format `sh` files using [`shfmt`](https://github.com/mvdan/sh). Risky: it depends on the configuration of `shfmt`. Configuration options: - `command` (`string[]`): the command to run and its arguments listed as separate entries; defaults to `['shfmt']` - `cwd` (`string`, `null`): the working directory or null to use the working dir of the current PHP process; defaults to `null` - `env` (`array`): the environment variables or null to use the same environment as the current PHP process; defaults to `[]` - `extensions` (`string[]`): the supported file extensions are used for formatting; defaults to `['sh', 'bats']` - `input` (`string`, `null`): the input as stream resource, scalar or \Traversable, or null for no input; defaults to `null` - `options` (`array`): the command options to run listed as separate entries; defaults to `[]` - `single_blank_line_at_eof` (`'\n'`, `'\r\n'`, `null`): the line ending to use at the end of the file; defaults to `null` - `skip_paths` (`string[]`): list of paths to skip; defaults to `[]` - `timeout` (`float`, `int`, `null`): the timeout in seconds or null to disable; defaults to `10` Sample1: configuration(`default`) Sample2: configuration(`['options' => ['--minify' => true]]`)SqlfluffFixer
Format `sql` files using [`sqlfluff`](https://github.com/sqlfluff/sqlfluff). Risky: it depends on the configuration of `sqlfluff`. Configuration options: - `command` (`string[]`): the command to run and its arguments listed as separate entries; defaults to `['sqlfluff', 'format']` - `cwd` (`string`, `null`): the working directory or null to use the working dir of the current PHP process; defaults to `null` - `env` (`array`): the environment variables or null to use the same environment as the current PHP process; defaults to `[]` - `extensions` (`string[]`): the supported file extensions are used for formatting; defaults to `['sql']` - `input` (`string`, `null`): the input as stream resource, scalar or \Traversable, or null for no input; defaults to `null` - `options` (`array`): the command options to run listed as separate entries; defaults to `[]` - `single_blank_line_at_eof` (`'\n'`, `'\r\n'`, `null`): the line ending to use at the end of the file; defaults to `null` - `skip_paths` (`string[]`): list of paths to skip; defaults to `[]` - `timeout` (`float`, `int`, `null`): the timeout in seconds or null to disable; defaults to `10` Sample1: configuration(`default`) Sample2: configuration(`['options' => ['--nocolor' => true]]`)SqruffFixer
Format `sql` files using [`sqruff`](https://github.com/quarylabs/sqruff). Risky: it depends on the configuration of `sqruff`. Configuration options: - `command` (`string[]`): the command to run and its arguments listed as separate entries; defaults to `['sqruff', 'fix']` - `cwd` (`string`, `null`): the working directory or null to use the working dir of the current PHP process; defaults to `null` - `env` (`array`): the environment variables or null to use the same environment as the current PHP process; defaults to `[]` - `extensions` (`string[]`): the supported file extensions are used for formatting; defaults to `['sql']` - `input` (`string`, `null`): the input as stream resource, scalar or \Traversable, or null for no input; defaults to `null` - `options` (`array`): the command options to run listed as separate entries; defaults to `[]` - `single_blank_line_at_eof` (`'\n'`, `'\r\n'`, `null`): the line ending to use at the end of the file; defaults to `null` - `skip_paths` (`string[]`): list of paths to skip; defaults to `[]` - `timeout` (`float`, `int`, `null`): the timeout in seconds or null to disable; defaults to `10` Sample1: configuration(`default`) Sample2: configuration(`['options' => ['--parsing-errors' => true]]`)TextlintFixer
Format `txt` files using [`textlint`](https://github.com/textlint/textlint). Risky: it depends on the configuration of `textlint`. Configuration options: - `command` (`string[]`): the command to run and its arguments listed as separate entries; defaults to `['textlint']` - `cwd` (`string`, `null`): the working directory or null to use the working dir of the current PHP process; defaults to `null` - `env` (`array`): the environment variables or null to use the same environment as the current PHP process; defaults to `[]` - `extensions` (`string[]`): the supported file extensions are used for formatting; defaults to `['txt', 'text', 'md', 'markdown']` - `input` (`string`, `null`): the input as stream resource, scalar or \Traversable, or null for no input; defaults to `null` - `options` (`array`): the command options to run listed as separate entries; defaults to `[]` - `single_blank_line_at_eof` (`'\n'`, `'\r\n'`, `null`): the line ending to use at the end of the file; defaults to `null` - `skip_paths` (`string[]`): list of paths to skip; defaults to `[]` - `timeout` (`float`, `int`, `null`): the timeout in seconds or null to disable; defaults to `10` Sample1: configuration(`['options' => ['--rule' => 'terminology']]`) Sample2: configuration(`['options' => ['--rule' => 'terminology', '--no-color' => true]]`)TombiFixer
Format `toml` files using [`tombi`](https://github.com/tombi-toml/tombi). Risky: it depends on the configuration of `tombi`. Configuration options: - `command` (`string[]`): the command to run and its arguments listed as separate entries; defaults to `['tombi', 'format']` - `cwd` (`string`, `null`): the working directory or null to use the working dir of the current PHP process; defaults to `null` - `env` (`array`): the environment variables or null to use the same environment as the current PHP process; defaults to `[]` - `extensions` (`string[]`): the supported file extensions are used for formatting; defaults to `['toml']` - `input` (`string`, `null`): the input as stream resource, scalar or \Traversable, or null for no input; defaults to `null` - `options` (`array`): the command options to run listed as separate entries; defaults to `[]` - `single_blank_line_at_eof` (`'\n'`, `'\r\n'`, `null`): the line ending to use at the end of the file; defaults to `null` - `skip_paths` (`string[]`): list of paths to skip; defaults to `[]` - `timeout` (`float`, `int`, `null`): the timeout in seconds or null to disable; defaults to `10` Sample1: configuration(`default`) Sample2: configuration(`['options' => ['--diff' => true]]`) Sample3: configuration(`['options' => ['--diff' => true]]`)TyposFixer
Format `any` files using [`typos`](https://github.com/crate-ci/typos). Risky: it depends on the configuration of `typos`. Configuration options: - `command` (`string[]`): the command to run and its arguments listed as separate entries; defaults to `['typos']` - `cwd` (`string`, `null`): the working directory or null to use the working dir of the current PHP process; defaults to `null` - `env` (`array`): the environment variables or null to use the same environment as the current PHP process; defaults to `[]` - `extensions` (`string[]`): the supported file extensions are used for formatting; defaults to `['*']` - `input` (`string`, `null`): the input as stream resource, scalar or \Traversable, or null for no input; defaults to `null` - `options` (`array`): the command options to run listed as separate entries; defaults to `[]` - `single_blank_line_at_eof` (`'\n'`, `'\r\n'`, `null`): the line ending to use at the end of the file; defaults to `null` - `skip_paths` (`string[]`): list of paths to skip; defaults to `[]` - `timeout` (`float`, `int`, `null`): the timeout in seconds or null to disable; defaults to `10` Sample1: configuration(`default`) Sample2: configuration(`['options' => ['--sort' => true]]`)XmllintFixer
Format `xml` files using [`xmllint`](https://gnome.pages.gitlab.gnome.org/libxml2/xmllint.html). Risky: it depends on the configuration of `xmllint`. Configuration options: - `command` (`string[]`): the command to run and its arguments listed as separate entries; defaults to `['xmllint']` - `cwd` (`string`, `null`): the working directory or null to use the working dir of the current PHP process; defaults to `null` - `env` (`array`): the environment variables or null to use the same environment as the current PHP process; defaults to `[]` - `extensions` (`string[]`): the supported file extensions are used for formatting; defaults to `['xml', 'xml.dist']` - `input` (`string`, `null`): the input as stream resource, scalar or \Traversable, or null for no input; defaults to `null` - `options` (`array`): the command options to run listed as separate entries; defaults to `[]` - `single_blank_line_at_eof` (`'\n'`, `'\r\n'`, `null`): the line ending to use at the end of the file; defaults to `null` - `skip_paths` (`string[]`): list of paths to skip; defaults to `[]` - `timeout` (`float`, `int`, `null`): the timeout in seconds or null to disable; defaults to `10` - `wrap_attributes_min_attrs` (`int`): minimum number of xml tag attributes for force wrap attribute options; defaults to `5` Sample1: configuration(`default`) Sample2: configuration(`['options' => ['--noblanks' => true]]`)YamlfmtFixer
Format `yaml` files using [`yamlfmt`](https://github.com/google/yamlfmt). Risky: it depends on the configuration of `yamlfmt`. Configuration options: - `command` (`string[]`): the command to run and its arguments listed as separate entries; defaults to `['yamlfmt']` - `cwd` (`string`, `null`): the working directory or null to use the working dir of the current PHP process; defaults to `null` - `env` (`array`): the environment variables or null to use the same environment as the current PHP process; defaults to `[]` - `extensions` (`string[]`): the supported file extensions are used for formatting; defaults to `['yaml', 'yml']` - `input` (`string`, `null`): the input as stream resource, scalar or \Traversable, or null for no input; defaults to `null` - `options` (`array`): the command options to run listed as separate entries; defaults to `[]` - `single_blank_line_at_eof` (`'\n'`, `'\r\n'`, `null`): the line ending to use at the end of the file; defaults to `null` - `skip_paths` (`string[]`): list of paths to skip; defaults to `[]` - `timeout` (`float`, `int`, `null`): the timeout in seconds or null to disable; defaults to `10` Sample1: configuration(`default`) Sample2: configuration(`['options' => ['-verbose' => true]]`) Sample3: configuration(`['options' => ['-verbose' => true]]`)ZhlintFixer
Format `zh_CN.md` files using [`zhlint`](https://github.com/zhlint-project/zhlint). Risky: it depends on the configuration of `zhlint`. Configuration options: - `command` (`string[]`): the command to run and its arguments listed as separate entries; defaults to `['zhlint']` - `cwd` (`string`, `null`): the working directory or null to use the working dir of the current PHP process; defaults to `null` - `env` (`array`): the environment variables or null to use the same environment as the current PHP process; defaults to `[]` - `extensions` (`string[]`): the supported file extensions are used for formatting; defaults to `['zh_CN.md']` - `input` (`string`, `null`): the input as stream resource, scalar or \Traversable, or null for no input; defaults to `null` - `options` (`array`): the command options to run listed as separate entries; defaults to `[]` - `single_blank_line_at_eof` (`'\n'`, `'\r\n'`, `null`): the line ending to use at the end of the file; defaults to `null` - `skip_paths` (`string[]`): list of paths to skip; defaults to `[]` - `timeout` (`float`, `int`, `null`): the timeout in seconds or null to disable; defaults to `10` Sample1: configuration(`default`) Sample2: configuration(`['options' => ['--config' => null]]`)JsonFixer
Format `json` files. Risky: it depends on the configuration. Configuration options: - `decode_flags` (`int`): the flags to use when decoding JSON; defaults to `0` - `encode_flags` (`int`): the flags to use when encoding JSON; defaults to `7344064` - `extensions` (`string[]`): the supported file extensions are used for formatting; defaults to `['json']` - `indent_string` (`' '`, `' '`, `'\t'`): the string to use for indentation; defaults to `' '` - `single_blank_line_at_eof` (`'\n'`, `'\r\n'`, `null`): the line ending to use at the end of the file; defaults to `'\n'` - `skip_paths` (`string[]`): list of paths to skip; defaults to `[]` Sample1: configuration(`default`) Sample2: configuration(`['indent_string' => ' ']`)SqlOfDoctrineSqlFormatterFixer
Format `sql` files using [`doctrine/sql-formatter`](https://github.com/doctrine/sql-formatter). Risky: it depends on the configuration of `doctrine/sql-formatter`. Configuration options: - `extensions` (`string[]`): the supported file extensions are used for formatting; defaults to `['sql']` - `indent_string` (`' '`, `' '`, `'\t'`): the SQL string with HTML styles and formatting wrapped in a <pre> tag; defaults to `' '` - `single_blank_line_at_eof` (`'\n'`, `'\r\n'`, `null`): the line ending to use at the end of the file; defaults to `'\n'` - `skip_paths` (`string[]`): list of paths to skip; defaults to `[]` Sample1: configuration(`default`) Sample2: configuration(`['indent_string' => ' ']`)SqlOfPhpmyadminSqlParserFixer
Format `sql` files using [`phpmyadmin/sql-parser`](https://github.com/phpmyadmin/sql-parser). Risky: it depends on the configuration of `phpmyadmin/sql-parser`. Configuration options: - `clause_newline` (`bool`): whether each clause should be on a new line; defaults to `true` - `extensions` (`string[]`): the supported file extensions are used for formatting; defaults to `['sql']` - `indent_parts` (`bool`): whether each part of each clause should be indented; defaults to `true` - `indentation` (`' '`, `' '`, `'\t'`, `null`): the string used for indentation; defaults to `null` - `line_ending` (`'\n'`, `'\r\n'`, `null`): the line ending used; defaults to `null` - `parts_newline` (`bool`): whether each part should be on a new line; defaults to `true` - `remove_comments` (`bool`): whether comments should be removed or not; defaults to `false` - `single_blank_line_at_eof` (`'\n'`, `'\r\n'`, `null`): the line ending to use at the end of the file; defaults to `'\n'` - `skip_paths` (`string[]`): list of paths to skip; defaults to `[]` Sample1: configuration(`default`) Sample2: configuration(`['clause_newline' => false]`) Sample3: configuration(`['indentation' => ' ']`)Composer scripts
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
- guanguans
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
All versions of php-cs-fixer-custom-fixers with dependencies
friendsofphp/php-cs-fixer Version ^3.95
illuminate/support Version ^8.83 || ^9.0 || ^10.0 || ^11.0 || ^12.0 || ^13.0