Skip to content

Instantly share code, notes, and snippets.

@theperfectwill
Created May 31, 2025 20:58
Show Gist options
  • Select an option

  • Save theperfectwill/c78c7a9f31f11be1b8a10ce9d791cb46 to your computer and use it in GitHub Desktop.

Select an option

Save theperfectwill/c78c7a9f31f11be1b8a10ce9d791cb46 to your computer and use it in GitHub Desktop.
Backup of PHP CS Fixer 2020-05-31
<?php
// @reference->https://mlocati.github.io/php-cs-fixer-configurator
$config = new PhpCsFixer\Config();
// Plugin Header
$plugin_header = <<<'EOF'
Scripture: {{scripture}}
Revelation: {{revelation}}
------------------------------------------------------------
@package_meta
@wordpress-plugin
------------------------------------------------------------
This plugin and file is read by "WordPress" to generate the plugin information and functionality.
@reference->https://wordpress.org/
------------------------------------------------------------
Focus: {{focus}}
Plugin Name: {{plugin_name}}
Plugin Slug: {{plugin_slug}}
Plugin URI: {{plugin_uri}}
Assets URI: {{assets_uri}}
------------------------------------------------------------
Description: {{description}}
@category {{category}}
@tags {{tags}}
------------------------------------------------------------
Version: {{plugin_version}}
@version v1.0.0.0
------------------------------------------------------------
Version Numbering: {major}.{minor}.{bugfix}[-{stage}.{level}]
{major} Major structural code changes and/or incompatible API changes (ie. breaking changes).
{minor} New functionality was added or improved in a backwards-compatible manner.
{bugfix} Backwards-compatible bug fixes or small improvements.
{stage}.{level} Pre-production release: dev < (aa|alpha) < (ba|beta) < (rc|release candidate).
------------------------------------------------------------
Author: {{author_name}}
@author {{author_name}} <{{author_email}}>
Author URI: {{author_url}}
------------------------------------------------------------
Text Domain: {{plugin_slug}}
Domain Path: /languages
------------------------------------------------------------
License: GPLv3
@license {{author_license}}
License URI: http://www.gnu.org/licenses/gpl-3.0.txt
------------------------------------------------------------
Requires PHP: 8.0
Requires At Least: 5.8
------------------------------------------------------------
Network: true
Tested Up To: 6.6.0
WC Tested Up To: 9.2.2
Elementor tested up to: 3.9
Elementor Pro tested up to: 3.9
------------------------------------------------------------
@package theperfectwill/{{plugin_slug}}
@subpackage MyNameSpace/MyPluginName
@shortname {{shortname}}
@encoding UTF-8
------------------------------------------------------------
@contributors {{plugin_contributors}}
@support {{support_mail}}
------------------------------------------------------------
@link {{repository_url}}
@see {{documentation_url}}
@copyright The Perfect Will, LLC. | {{copyright}} | https://theperfectwill.business/privacy-center/copyrights/plugins
------------------------------------------------------------
@notes
=== RELEASE NOTES ===
Check readme file for full release notes.
{{plugin_name}} is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License
as published by the Free Software Foundation, either version 2 of the License, or any later version.
{{plugin_name}} is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with {{plugin_name}}.
If not, see https://www.gnu.org/licenses/gpl-2.0.html for applicable details.
EOF;
// File Header
$file_header = <<<'EOF'
Scripture: {{scripture}}
Revelation: {{revelation}}
------------------------------------------------------------
Description: {{file_description}}
Version: {{file_version}}
@version 1.0.0.0
------------------------------------------------------------
Version Numbering: {major}.{minor}.{bugfix}[-{stage}.{level}]
{major} Major structural code changes and/or incompatible API changes (ie. breaking changes).
{minor} New functionality was added or improved in a backwards-compatible manner.
{bugfix} Backwards-compatible bug fixes or small improvements.
{stage}.{level} Pre-production release: dev < (aa|alpha) < (ba|beta) < (rc|release candidate).
------------------------------------------------------------
@contributors {{file_contributors}}
------------------------------------------------------------
@notes
EOF;
// Require custom fixers
require '.composer/vendor/kubawerlos/php-cs-fixer-custom-fixers/bootstrap.php';
require '.composer/vendor/juliangut/php-cs-fixer-custom-fixers/bootstrap.php';
return $config
// Basic settings
->setRiskyAllowed(true)
->setIndent("\t")
->setLineEnding("\r\n")
->setUsingCache(false)
// Register Custom Fixers
->registerCustomFixers(new \PhpCsFixerCustomFixers\Fixers())
->registerCustomFixers(new \Jgut\PhpCsFixerCustomFixers\Fixers())
// Location logic
->setFinder(
PhpCsFixer\Finder::create()
->in(__DIR__ . DIRECTORY_SEPARATOR)
->name('*.php')
->notPath('dump.php')
->notPath('advanced-cache.php')
->notPath('.css')
->notPath('.scss')
->notPath('.js')
->notPath('.htaccess')
->notPath('.txt')
->notPath('.docker')
->notPath('.ppm')
->exclude('cache')
->exclude('wordpress')
->exclude('woocommerce')
->exclude('_data')
->exclude('_output')
->exclude('_support')
->exclude('assets')
->exclude('cache')
->exclude('patches')
->exclude('public')
->exclude('config')
->exclude('var')
->exclude('tests')
->exclude('v1')
->exclude('vendor')
->exclude('Plugin/Codes/Repos/')
->exclude('builder/dist/js/*.js')
->ignoreDotFiles(true)
->ignoreVCS(true)
// ->append([
// 'file-to-include',
// ])
)
// Formatting Rules
->setRules([
// Preset Rules
'@Symfony' => false,
'@PhpCsFixer' => false,
'@PSR2' => false,
'@PSR12' => false,
// PHP Migrations
'@PHP54Migration' => true,
'@PHP70Migration' => true,
'@PHP71Migration' => true,
'@PHP73Migration' => true,
'@PHP74Migration' => true,
'@PHP80Migration' => true,
'@PHP81Migration' => true,
'@PHP82Migration' => true,
'@PHP83Migration' => true,
'@PHP84Migration' => true,
// File Header Comment
// 'header_comment' => [
// 'header' => $plugin_header, // Adds our $plugin_header value as the header doc comment
// // 'header' => $file_header, // Adds our $file_header value as the header doc comment
// // 'header' => '', // Removes the header doc comment
// 'comment_type' => 'PHPDoc',
// 'location' => 'after_declare_strict',
// 'separate' => 'both',
// ],
// General Ordering
'ordered_imports' => [
'case_sensitive' => false,
'sort_algorithm' => 'length',
'imports_order' => [
'const',
'class',
'function',
],
],
// Array
'array_syntax' => ['syntax' => 'short'],
'no_whitespace_before_comma_in_array' => true,
'normalize_index_brace' => true,
'trim_array_spaces' => true,
'whitespace_after_comma_in_array' => true,
'no_trailing_comma_in_singleline' => [
'elements' => [
'arguments',
'array_destructuring',
'array',
'group_import',
]
],
// Braces
'braces_position' => [
'anonymous_classes_opening_brace' => 'same_line',
'anonymous_functions_opening_brace' => 'same_line',
'classes_opening_brace' => 'same_line',
'functions_opening_brace' => 'same_line',
'control_structures_opening_brace' => 'same_line',
'allow_single_line_empty_anonymous_classes' => true,
'allow_single_line_anonymous_functions' => true,
],
// Cases
'constant_case' => ['case' => 'lower'],
'lowercase_keywords' => true,
'lowercase_static_reference' => true,
'magic_constant_casing' => true,
'native_function_casing' => true,
'native_function_type_declaration_casing' => true,
'cast_spaces' => ['space' => 'single'],
'lowercase_cast' => true,
'no_short_bool_cast' => true,
'no_unset_cast' => true,
'short_scalar_cast' => true,
// Classes
'class_definition' => true,
'no_blank_lines_after_class_opening' => false,
'no_null_property_initialization' => true,
'protected_to_private' => true,
'self_static_accessor' => true,
'single_class_element_per_statement' => true,
'single_trait_insert_per_statement' => false,
'visibility_required' => true,
'class_attributes_separation' => [
'elements' => [
'const' => 'only_if_meta',
'method' => 'only_if_meta',
'property' => 'only_if_meta',
'trait_import' => 'only_if_meta',
'case' => 'only_if_meta',
],
],
'ordered_class_elements' => [
'order' => [
'use_trait',
'case',
'constant_public',
'constant_protected',
'constant_private',
'property_public',
'property_protected',
'property_private',
'construct',
'destruct',
'magic',
'method_public',
'method_protected',
'method_private',
'phpunit',
],
],
// Comment
'multiline_comment_opening_closing' => true,
'no_empty_comment' => true,
'no_trailing_whitespace_in_comment' => true,
'single_line_comment_style' => true,
'single_line_comment_spacing' => true,
// Control Structure
'control_structure_braces' => true,
'control_structure_continuation_position' => ['position' => 'same_line'],
'elseif' => true,
'empty_loop_body' => true,
'empty_loop_condition' => ['style' => 'while'],
'include' => true,
'no_alternative_syntax' => true,
'no_break_comment' => false,
'no_superfluous_elseif' => true,
'no_unneeded_control_parentheses' => true,
'no_unneeded_braces' => true,
'no_useless_else' => true,
'simplified_if_return' => false,
'switch_case_semicolon_to_colon' => false,
'switch_case_space' => true,
'switch_continue_to_break' => true,
'trailing_comma_in_multiline' => true,
'yoda_style' => true,
// Function Notation
'function_declaration' => true,
'function_typehint_space' => true,
'lambda_not_used_import' => true,
'method_argument_space' => true,
'no_spaces_after_function_name' => true,
'nullable_type_declaration_for_default_null_value' => true,
'return_type_declaration' => true,
'single_line_throw' => true,
'no_multiple_statements_per_line' => true,
// Import
'fully_qualified_strict_types' => true,
'global_namespace_import' => true,
'group_import' => false,
'no_leading_import_slash' => true,
'no_unused_imports' => true,
'single_import_per_statement' => true,
'single_line_after_imports' => true,
// Language Construct
'combine_consecutive_issets' => true,
'combine_consecutive_unsets' => true,
'declare_equal_normalize' => ['space' => 'single'],
'declare_parentheses' => true,
'explicit_indirect_variable' => true,
'statement_indentation' => true,
'single_space_around_construct' => [
// List of constructs which must contain a single space.
'constructs_contain_a_single_space' => [
'yield_from',
],
// List of constructs which must be preceded by a single space
'constructs_preceded_by_a_single_space' => [
'as',
'else',
'elseif',
'use_lambda',
],
// List of constructs which must be followed by a single space
'constructs_followed_by_a_single_space' => [
'abstract',
'as',
'attribute',
'break',
'case',
'catch',
'class',
'clone',
'comment',
'const',
'const_import',
'continue',
'do',
'echo',
'else',
'elseif',
'enum',
'extends',
'final',
'finally',
'for',
'foreach',
'function',
'function_import',
'global',
'goto',
'if',
'implements',
'include',
'include_once',
'instanceof',
'insteadof',
'interface',
'match',
'named_argument',
'namespace',
'new',
'open_tag_with_echo',
'php_doc',
'php_open',
'print',
'private',
'protected',
'public',
'readonly',
'require',
'require_once',
'return',
'static',
'switch',
'throw',
'trait',
'try',
'type_colon',
'use',
'use_lambda',
'use_trait',
'var',
'while',
'yield',
'yield_from',
],
],
// List Notation
'list_syntax' => ['syntax' => 'short'],
// Namespace Notation
'no_blank_lines_before_namespace' => false,
'single_blank_line_before_namespace' => true,
'blank_line_after_namespace' => true,
'no_leading_namespace_whitespace' => true,
'clean_namespace' => true,
// Operator
'concat_space' => [
'spacing' => 'one'
],
'increment_style' => true,
'new_with_parentheses' => true,
'not_operator_with_space' => false,
'not_operator_with_successor_space' => false,
'object_operator_without_whitespace' => true,
'operator_linebreak' => [
'only_booleans' => false,
'position' => 'end',
],
'standardize_increment' => true,
'standardize_not_equals' => true,
'ternary_operator_spaces' => true,
'ternary_to_null_coalescing' => true,
'unary_operator_spaces' => [
'only_dec_inc' => false,
],
'binary_operator_spaces' => [
// Options Available
// 'align',
// 'align_by_scope',
// 'align_single_space',
// 'align_single_space_minimal',
// 'align_single_space_by_scope',
// 'align_single_space_minimal_by_scope',
// 'single_space',
// 'no_space',
// 'at_least_single_space',
'default' => 'single_space',
'operators' => [
'=' => 'align_single_space_minimal',
'*' => 'align_single_space_minimal',
'/' => 'align_single_space_minimal',
'%' => 'align_single_space_minimal',
'<' => 'align_single_space_minimal',
'>' => 'align_single_space_minimal',
'|' => 'align_single_space_minimal',
'^' => 'align_single_space_minimal',
'+' => 'align_single_space_minimal',
'-' => 'align_single_space_minimal',
'&' => 'align_single_space_minimal',
'&=' => 'align_single_space_minimal',
'&&' => 'align_single_space_minimal',
'||' => 'align_single_space_minimal',
'.=' => 'align_single_space_minimal',
'/=' => 'align_single_space_minimal',
'=>' => 'align_single_space_minimal',
'==' => 'align_single_space_minimal',
'>=' => 'align_single_space_minimal',
'===' => 'align_single_space_minimal',
'!=' => 'align_single_space_minimal',
'<>' => 'align_single_space_minimal',
'!==' => 'align_single_space_minimal',
'<=' => 'align_single_space_minimal',
'and' => 'align_single_space_minimal',
'or' => 'align_single_space_minimal',
'xor' => 'align_single_space_minimal',
'-=' => 'align_single_space_minimal',
'%=' => 'align_single_space_minimal',
'*=' => 'align_single_space_minimal',
'|=' => 'align_single_space_minimal',
'+=' => 'align_single_space_minimal',
'<<' => 'align_single_space_minimal',
'<<=' => 'align_single_space_minimal',
'>>' => 'align_single_space_minimal',
'>>=' => 'align_single_space_minimal',
'^=' => 'align_single_space_minimal',
'**' => 'align_single_space_minimal',
'**=' => 'align_single_space_minimal',
'<=>' => 'align_single_space_minimal',
'??' => 'align_single_space_minimal',
],
],
// PHP Tag
'blank_line_after_opening_tag' => true,
'full_opening_tag' => true,
'linebreak_after_opening_tag' => true,
'no_closing_tag' => true,
'echo_tag_syntax' => [
'format' => 'long',
'long_function' => 'echo',
],
// PHPDoc
'align_multiline_comment' => [
'comment_type' => 'all_multiline',
],
'general_phpdoc_annotation_remove' => false,
'general_phpdoc_tag_rename' => [
'case_sensitive' => true,
'fix_annotation' => true,
'fix_inline' => true,
'replacements' => [
// A map of tags to replace.
'inheritDocs' => 'inheritDoc',
'note' => 'notes',
'notes' => 'notes',
'note()' => 'notes',
'notes()' => 'notes',
'scripture' => 'Scripture',
'revelation' => 'Revelation',
],
],
'no_blank_lines_after_phpdoc' => false,
'no_empty_phpdoc' => true,
'phpdoc_add_missing_param_annotation' => ['only_untyped' => false],
'phpdoc_order' => [
'order' => [
'param',
'custom',
'throws',
'return',
]
],
'phpdoc_separation' => [
'groups' => [
[
'Scripture',
'Revelation',
],
[
'package_meta',
'wordpress-plugin',
],
[
'category',
'tags',
],
[
'author',
],
[
'license',
],
[
'package',
'subpackage',
'shortname',
'encoding',
],
[
'contributors',
'support',
],
[
'link',
'see',
'copyright',
],
[
'attach',
'attached',
'attaches',
'attaches-to',
'note',
'notes',
],
]
],
'phpdoc_types_order' => [
'case_sensitive' => false,
'sort_algorithm' => 'alpha',
'null_adjustment' => 'always_last',
],
'phpdoc_align' => [
'align' => 'vertical',
'spacing' => 1,
],
'phpdoc_annotation_without_dot' => true,
'phpdoc_indent' => true,
'phpdoc_inline_tag_normalizer' => true,
'phpdoc_line_span' => [
'const' => 'single',
'property' => 'single',
'method' => 'single',
],
'phpdoc_no_access' => true,
'phpdoc_no_alias_tag' => [
'replacements' => [
'property-read' => 'property',
'property-write' => 'property',
'type' => 'var',
],
],
'phpdoc_no_empty_return' => true,
'phpdoc_no_package' => false,
'phpdoc_no_useless_inheritdoc' => true,
'phpdoc_order_by_value' => false,
'phpdoc_return_self_reference' => [
'replacements' => [
'this' => '$this',
'@this' => '$this',
'$self' => 'self',
'@self' => 'self',
'$static' => 'static',
'@static' => 'static',
]
],
'phpdoc_scalar' => false,
'phpdoc_single_line_var_spacing' => true,
'phpdoc_summary' => true,
'phpdoc_tag_casing' => true,
'phpdoc_tag_type' => true,
'phpdoc_to_comment' => true,
'phpdoc_trim_consecutive_blank_line_separation' => true,
'phpdoc_trim' => true,
'phpdoc_types' => true,
'phpdoc_var_annotation_correct_order' => true,
'phpdoc_var_without_name' => true,
'heredoc_to_nowdoc' => true,
'doctrine_annotation_braces' => [
'ignored_tags' => [
'abstract',
'access',
'code',
'deprec',
'encode',
'exception',
'final',
'ingroup',
'inheritdoc',
'inheritDoc',
'magic',
'name',
'toc',
'tutorial',
'private',
'static',
'staticvar',
'staticVar',
'api',
'author',
'category',
'copyright',
'deprecated',
'example',
'filesource',
'global',
'ignore',
'internal',
'license',
'link',
'method',
'package',
'param',
'property',
'property-read',
'property-write',
'see',
'since',
'source',
'subpackage',
'throws',
'todo',
'TODO',
'usedBy',
'uses',
'var',
'version',
'after',
'afterClass',
'backupGlobals',
'backupStaticAttributes',
'before',
'beforeClass',
'codeCoverageIgnore',
'codeCoverageIgnoreStart',
'codeCoverageIgnoreEnd',
'covers',
'coversDefaultClass',
'coversNothing',
'dataProvider',
'depends',
'expectedException',
'expectedExceptionCode',
'expectedExceptionMessage',
'expectedExceptionMessageRegExp',
'group',
'large',
'medium',
'preserveGlobalState',
'requires',
'runTestsInSeparateProcesses',
'runInSeparateProcess',
'small',
'test',
'testdox',
'ticket',
'SuppressWarnings',
'noinspection',
'package_version',
'enduml',
'startuml',
'psalm',
'phpstan',
'template',
'fix',
'FIXME',
'fixme',
'override',
],
'syntax' => 'without_braces',
],
'doctrine_annotation_spaces' => [
'after_argument_assignments' => false,
'before_argument_assignments' => false,
'after_array_assignments_colon' => true,
'before_array_assignments_colon' => true,
'after_array_assignments_equals' => true,
'before_array_assignments_equals' => true,
'around_commas' => true,
'around_parentheses' => true
],
// Return Notation
'no_useless_return' => true,
'return_assignment' => true,
'simplified_null_return' => true,
// Semi-Colon Notation
'no_empty_statement' => true,
'no_singleline_whitespace_before_semicolons' => true,
'semicolon_after_instruction' => true,
'space_after_semicolon' => true,
// String Notation
'escape_implicit_backslashes' => true,
'explicit_string_variable' => true,
'no_binary_string' => true,
'simple_to_complex_string_variable' => true,
'single_quote' => true,
// Whitespace
'array_indentation' => true,
'compact_nullable_typehint' => true,
'heredoc_indentation' => true,
'indentation_type' => true,
'line_ending' => true,
'method_chaining_indentation' => true,
'no_extra_blank_lines' => true,
'no_spaces_around_offset' => true,
'no_spaces_inside_parenthesis' => true,
'no_trailing_whitespace' => true,
'no_whitespace_in_blank_line' => true,
'single_blank_line_at_eof' => true,
'types_spaces' => ['space' => 'single'],
'blank_line_between_import_groups' => true,
'blank_line_before_statement' => [
'statements' => [
// Custom
'break',
'case',
'continue',
'declare',
'default',
'do',
'exit',
'for',
'foreach',
'goto',
'if',
// 'include',
// 'include_once',
'phpdoc',
// 'require',
// 'require_once',
'return',
'switch',
'throw',
'try',
'while',
'yield',
'yield_from',
],
],
// Namespace backslashes before functions
'native_function_invocation' => [
'exclude' => [
// We can specifc functions names if needed
],
'include' => [
'@internal',
'@compiler_optimized',
// We can put our own custom functions names if needed
],
'scope' => 'all', // Only fix function calls that are made within a namespace or fix all.
'strict' => false, // Whether leading \ of function call not meant to have it should be removed.
],
// PHP Unit Testing
'php_unit_test_class_requires_covers' => true,
'php_unit_internal_class' => [
'types' => [
'abstract',
'final',
'normal',
],
],
// Custom Fixers
// @reference->https://github.com/kubawerlos/php-cs-fixer-custom-fixers
// @reference->https://github.com/juliangut/php-cs-fixer-custom-fixers
// Comments
\PhpCsFixerCustomFixers\Fixer\CommentSurroundedBySpacesFixer::name() => true,
\PhpCsFixerCustomFixers\Fixer\MultilineCommentOpeningClosingAloneFixer::name() => true,
\PhpCsFixerCustomFixers\Fixer\NoDoctrineMigrationsGeneratedCommentFixer::name() => true,
\PhpCsFixerCustomFixers\Fixer\NoPhpStormGeneratedCommentFixer::name() => true,
\PhpCsFixerCustomFixers\Fixer\NoUselessDoctrineRepositoryCommentFixer::name() => true,
\PhpCsFixerCustomFixers\Fixer\NoUselessCommentFixer::name() => false, // Maybe when formatting our own projects
\PhpCsFixerCustomFixers\Fixer\NoCommentedOutCodeFixer::name() => false, // Maybe keep for production releases
// \PhpCsFixerCustomFixers\Fixer\WhiteSpaceAroundClassBody::name() => true, // TODO...
\Jgut\PhpCsFixerCustomFixers\Fixer\LeadingUppercaseCommentFixer::name() => true,
\Jgut\PhpCsFixerCustomFixers\Fixer\PhpdocLeadingUppercaseSummaryFixer::name() => true,
\Jgut\PhpCsFixerCustomFixers\Fixer\FloatLeadingZeroFixer::name() => true,
// Ensure these functions are commented out when formatted
\PhpCsFixerCustomFixers\Fixer\CommentedOutFunctionFixer::name() => [
'print_r',
'var_dump',
'var_export'
],
// General
\PhpCsFixerCustomFixers\Fixer\DeclareAfterOpeningTagFixer::name() => true,
\PhpCsFixerCustomFixers\Fixer\EmptyFunctionBodyFixer::name() => true,
\PhpCsFixerCustomFixers\Fixer\ConstructorEmptyBracesFixer::name() => true,
\PhpCsFixerCustomFixers\Fixer\ClassConstantUsageFixer::name() => true,
\PhpCsFixerCustomFixers\Fixer\IssetToArrayKeyExistsFixer::name() => false,
\PhpCsFixerCustomFixers\Fixer\ForeachUseValueFixer::name() => false,
\PhpCsFixerCustomFixers\Fixer\SingleSpaceBeforeStatementFixer::name() => true,
\PhpCsFixerCustomFixers\Fixer\SingleSpaceAfterStatementFixer::name() => true,
\PhpCsFixerCustomFixers\Fixer\NoTrailingCommaInSinglelineFixer::name() => true,
\PhpCsFixerCustomFixers\Fixer\NoDuplicatedArrayKeyFixer::name() => true,
\PhpCsFixerCustomFixers\Fixer\NoDuplicatedImportsFixer::name() => true,
\PhpCsFixerCustomFixers\Fixer\NoUselessWriteVisibilityFixer::name() => true,
\PhpCsFixerCustomFixers\Fixer\NoUselessDirnameCallFixer::name() => true,
\PhpCsFixerCustomFixers\Fixer\NoUselessParenthesisFixer::name() => true,
\PhpCsFixerCustomFixers\Fixer\NoUselessStrlenFixer::name() => false,
\PhpCsFixerCustomFixers\Fixer\TrimKeyFixer::name() => true,
// General Namespace
\PhpCsFixerCustomFixers\Fixer\NoImportFromGlobalNamespaceFixer::name() => true,
\PhpCsFixerCustomFixers\Fixer\NoLeadingSlashInGlobalNamespaceFixer::name() => true,
\PhpCsFixerCustomFixers\Fixer\InternalClassCasingFixer::name() => true,
// Promoted Properties
\PhpCsFixerCustomFixers\Fixer\PromotedConstructorPropertyFixer::name() => true,
\PhpCsFixerCustomFixers\Fixer\ReadonlyPromotedPropertiesFixer::name() => false,
\PhpCsFixerCustomFixers\Fixer\MultilinePromotedPropertiesFixer::name() => false,
// Misc
\PhpCsFixerCustomFixers\Fixer\NumericLiteralSeparatorFixer::name() => true,
\PhpCsFixerCustomFixers\Fixer\NoNullableBooleanTypeFixer::name() => false,
\PhpCsFixerCustomFixers\Fixer\NoReferenceInFunctionDefinitionFixer::name() => false,
\PhpCsFixerCustomFixers\Fixer\NoSuperfluousConcatenationFixer::name() => false,
\PhpCsFixerCustomFixers\Fixer\StringableInterfaceFixer::name() => true,
// Data Provider
\PhpCsFixerCustomFixers\Fixer\DataProviderNameFixer::name() => true,
\PhpCsFixerCustomFixers\Fixer\DataProviderReturnTypeFixer::name() => true,
\PhpCsFixerCustomFixers\Fixer\DataProviderStaticFixer::name() => true,
// PHP Unit Testing
\PhpCsFixerCustomFixers\Fixer\PhpUnitAssertArgumentsOrderFixer::name() => true,
\PhpCsFixerCustomFixers\Fixer\PhpUnitDedicatedAssertFixer::name() => true,
\PhpCsFixerCustomFixers\Fixer\PhpUnitNoUselessReturnFixer::name() => true,
// PHP Doc
\PhpCsFixerCustomFixers\Fixer\PhpdocArrayStyleFixer::name() => true,
\PhpCsFixerCustomFixers\Fixer\PhpdocNoIncorrectVarAnnotationFixer::name() => true,
\PhpCsFixerCustomFixers\Fixer\PhpdocNoSuperfluousParamFixer::name() => true,
// list of annotations to keep in PHPDoc
// \PhpCsFixerCustomFixers\Fixer\PhpdocOnlyAllowedAnnotationsFixer::name() => [
// '@license',// doesn't work?
// 'license', // doesn't work?
// ],
\PhpCsFixerCustomFixers\Fixer\PhpdocParamOrderFixer::name() => true,
\PhpCsFixerCustomFixers\Fixer\PhpdocParamTypeFixer::name() => true,
\PhpCsFixerCustomFixers\Fixer\PhpdocSelfAccessorFixer::name() => true,
\PhpCsFixerCustomFixers\Fixer\PhpdocSingleLineVarFixer::name() => true,
\PhpCsFixerCustomFixers\Fixer\PhpdocTypeListFixer::name() => true,
\PhpCsFixerCustomFixers\Fixer\PhpdocTypesCommaSpacesFixer::name() => true,
\PhpCsFixerCustomFixers\Fixer\PhpdocTypesTrimFixer::name() => true,
// Special
\PhpCsFixerCustomFixers\Fixer\PhpdocVarAnnotationToAssertFixer::name() => true,
])
;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment