diff --git a/.php-cs-fixer.dist.php b/.php-cs-fixer.dist.php new file mode 100644 index 0000000..8544b67 --- /dev/null +++ b/.php-cs-fixer.dist.php @@ -0,0 +1,23 @@ +setParallelConfig(ParallelConfigFactory::detect()) + ->setFinder(PhpCsFixer::getFinder()) + ->setUsingCache(false) + ->registerCustomFixers([ + new CustomControllerOrderFixer(), + new CustomOrderedClassElementsFixer(), + new CustomPhpUnitOrderFixer(), + ]) + ->setRules([ + 'Tighten/custom_controller_order' => true, + 'Tighten/custom_ordered_class_elements' => true, + 'Tighten/custom_phpunit_order' => true, + ]); diff --git a/.phpcs.xml.dist b/.phpcs.xml.dist new file mode 100644 index 0000000..5ffcf8e --- /dev/null +++ b/.phpcs.xml.dist @@ -0,0 +1,12 @@ + + + app + config + database + public + resources + routes + tests + + + diff --git a/duster.json b/duster.json new file mode 100644 index 0000000..07f5e0e --- /dev/null +++ b/duster.json @@ -0,0 +1,12 @@ +{ + "include": [ + "bin", + "scripts", + "src", + "tests" + ], + "exclude": [ + "tests/fixtures", + 'resources/fontawesome/**' + ] +} diff --git a/pint.json b/pint.json index 7eb5048..2964efd 100644 --- a/pint.json +++ b/pint.json @@ -1,11 +1,45 @@ { "preset": "laravel", "rules": { + "blank_line_between_import_groups": true, "concat_space": { "spacing": "one" }, + "class_attributes_separation": { + "elements": { + "method": "one" + } + }, + "curly_braces_position": { + "control_structures_opening_brace": "same_line", + "functions_opening_brace": "next_line_unless_newline_at_signature_end", + "anonymous_functions_opening_brace": "same_line", + "classes_opening_brace": "next_line_unless_newline_at_signature_end", + "anonymous_classes_opening_brace": "next_line_unless_newline_at_signature_end", + "allow_single_line_empty_anonymous_classes": true, + "allow_single_line_anonymous_functions": false + }, + "explicit_string_variable": true, + "global_namespace_import": { + "import_classes": true, + "import_constants": true, + "import_functions": true + }, + "new_with_braces": { + "named_class": false, + "anonymous_class": false + }, "ordered_imports": { - "sort_algorithm": "alpha" - } + "sort_algorithm": "alpha", + "imports_order": [ + "const", + "class", + "function" + ] + }, + "php_unit_test_annotation": { + "style": "annotation" + }, + "simple_to_complex_string_variable": true } }