From 3f55425190eebe7a6837dd4be11e07064999035d Mon Sep 17 00:00:00 2001 From: Johannes Wachter Date: Thu, 27 Feb 2020 13:20:01 +0100 Subject: [PATCH] added basic files --- .editorconfig | 17 ++++++ .gitattributes | 7 +++ .gitignore | 22 ++++++++ .php_cs.dist | 36 ++++++++++++ HandcraftedInTheAlpsSuluResourceBundle.php | 11 ++++ composer.json | 64 ++++++++++++++++++++++ phpstan.neon | 16 ++++++ phpunit.xml.dist | 25 +++++++++ 8 files changed, 198 insertions(+) create mode 100644 .editorconfig create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 .php_cs.dist create mode 100644 HandcraftedInTheAlpsSuluResourceBundle.php create mode 100644 composer.json create mode 100644 phpstan.neon create mode 100644 phpunit.xml.dist diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..73a6c8d --- /dev/null +++ b/.editorconfig @@ -0,0 +1,17 @@ +# EditorConfig helps developers define and maintain consistent coding styles between different editors and IDEs +# editorconfig.org + +root = true + +[*] +indent_style = space +indent_size = 4 +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true +max_line_length = 120 + +# markdown uses two trailing spaces for explicit line breaks +[*.md] +trim_trailing_whitespace = false diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..c4d23cb --- /dev/null +++ b/.gitattributes @@ -0,0 +1,7 @@ +.editorconfig export-ignore +.gitattributes export-ignore +.gitignore export-ignore +.php_cs.dist export-ignore +.phpstan.neon export-ignore +.phpunit.xml.dist export-ignore +/Tests export-ignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..f8c32b9 --- /dev/null +++ b/.gitignore @@ -0,0 +1,22 @@ +# PHPUnit +/phpunit.xml +.phpunit.result.cache + +# composer +/composer.phar +/composer.lock +/auth.json +/vendor + +# IDEs +.idea/* +*.iml +*~ +.php-version +php.ini + +# System files +.DS_Store + +# php-cs-fixer +.php_cs.cache diff --git a/.php_cs.dist b/.php_cs.dist new file mode 100644 index 0000000..567062a --- /dev/null +++ b/.php_cs.dist @@ -0,0 +1,36 @@ +exclude(['var/cache']) + ->in(__DIR__); + +return PhpCsFixer\Config::create() + ->setRiskyAllowed(true) + ->setRules([ + '@Symfony' => true, + '@Symfony:risky' => true, + 'ordered_imports' => true, + 'concat_space' => ['spacing' => 'one'], + 'array_syntax' => ['syntax' => 'short'], + 'phpdoc_align' => false, + 'class_definition' => [ + 'multiLineExtendsEachSingleLine' => true, + ], + 'linebreak_after_opening_tag' => true, + 'declare_strict_types' => true, + 'mb_str_functions' => true, + 'method_argument_space' => ['on_multiline' => 'ensure_fully_multiline'], + 'no_php4_constructor' => true, + 'no_superfluous_phpdoc_tags' => ['allow_mixed' => true], + 'no_unreachable_default_argument_value' => true, + 'no_useless_else' => true, + 'no_useless_return' => true, + 'php_unit_strict' => true, + 'phpdoc_order' => true, + 'semicolon_after_instruction' => true, + 'strict_comparison' => true, + 'strict_param' => true, + 'array_indentation' => true, + 'multiline_whitespace_before_semicolons' => true, + ]) + ->setFinder($finder); diff --git a/HandcraftedInTheAlpsSuluResourceBundle.php b/HandcraftedInTheAlpsSuluResourceBundle.php new file mode 100644 index 0000000..fda689f --- /dev/null +++ b/HandcraftedInTheAlpsSuluResourceBundle.php @@ -0,0 +1,11 @@ + + + + + ./Tests + + + + + + . + + Resources/ + Tests/ + vendor/ + + + + + + + + + +