From c840954ad1063327469fd52bd1cb8bf81fce5df6 Mon Sep 17 00:00:00 2001 From: "R. Eric Wheeler" Date: Tue, 7 Feb 2017 13:54:24 -0800 Subject: [PATCH] updated composer.json --- .php_cs | 57 ++++++++++++++++++++++++++++++++++++++++++++++++++ CHANGELOG.md | 4 +++- composer.json | 3 ++- html/index.php | 22 ++++++++++++++++++- 4 files changed, 83 insertions(+), 3 deletions(-) create mode 100644 .php_cs diff --git a/.php_cs b/.php_cs new file mode 100644 index 0000000..5285396 --- /dev/null +++ b/.php_cs @@ -0,0 +1,57 @@ +. +EOF; + + +return PhpCsFixer\Config::create() + ->setRiskyAllowed(true) + ->setRules( + [ + '@Symfony' => true, + 'header_comment' => ['header' => $header], + 'ordered_class_elements' => true, + 'ordered_imports' => true, + 'no_mixed_echo_print' => ['use' => 'print'], + 'strict_param' => true, + 'strict_comparison' => true, + 'single_import_per_statement' => false, + 'phpdoc_order' => true, + 'array_syntax' => ['syntax' => 'short'], + 'short_echo_tag' => false, + 'phpdoc_add_missing_param_annotation' => true, + 'psr4' => true, + 'no_extra_consecutive_blank_lines' => [ + 'break', + 'continue', + 'extra', + 'return', + 'throw', + 'parenthesis_brace_block', + 'square_brace_block', + 'curly_brace_block' + ], + ] + )->setFinder( + PhpCsFixer\Finder::create() + ->ignoreDotFiles(true) + ->ignoreVCS(true) + ->name('*.php') + ->in('src') + ->in('html') + ); \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 9248e3c..ebbf62f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/). ### Changed - composer.json - .gitignore +### Added +- .php_cs +- php-cs-fixer ## [0.0.1] - 2017-02-07 ### Added @@ -17,6 +20,5 @@ and this project adheres to [Semantic Versioning](http://semver.org/). ### Added - source structure - html/index.php - ### Changed - docker-compose.yml, added mysql diff --git a/composer.json b/composer.json index 091b9a4..80830fe 100644 --- a/composer.json +++ b/composer.json @@ -22,7 +22,8 @@ }, "require-dev": { "phpunit/phpunit": "^6.0", - "fzaninotto/faker": "^1.6" + "fzaninotto/faker": "^1.6", + "friendsofphp/php-cs-fixer": "^2.0" }, "autoload": { "psr-0": { diff --git a/html/index.php b/html/index.php index c4837a3..73a6723 100644 --- a/html/index.php +++ b/html/index.php @@ -1 +1,21 @@ -. + */ + +phpinfo();