From 3523017e0266a6289c59c00cd53d1776458b1422 Mon Sep 17 00:00:00 2001 From: Arkadiusz Kondas Date: Tue, 4 Apr 2017 21:09:46 +0200 Subject: [PATCH] Update cs-fixer --- .gitignore | 1 + .php_cs | 17 +++++++++++++++++ bin/php-cs-fixer.sh | 6 ------ classification/languageDetection.php | 2 +- regression/wineQuality.php | 2 +- 5 files changed, 20 insertions(+), 8 deletions(-) create mode 100644 .php_cs delete mode 100755 bin/php-cs-fixer.sh diff --git a/.gitignore b/.gitignore index 73854f2..8881c4d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ /vendor/ humbuglog.* /bin/phpunit +.php_cs.cache diff --git a/.php_cs b/.php_cs new file mode 100644 index 0000000..3f7023b --- /dev/null +++ b/.php_cs @@ -0,0 +1,17 @@ +setRules([ + '@PSR2' => true, + 'declare_strict_types' => true, + 'array_syntax' => ['syntax' => 'short'], + 'blank_line_after_opening_tag' => true, + 'single_blank_line_before_namespace' => true, + 'no_unused_imports' => true + ]) + ->setFinder( + PhpCsFixer\Finder::create() + ->in(__DIR__ . '/classification') + ->in(__DIR__ . '/regression') + )->setRiskyAllowed(true) + ->setUsingCache(false); \ No newline at end of file diff --git a/bin/php-cs-fixer.sh b/bin/php-cs-fixer.sh deleted file mode 100755 index 3b775e6..0000000 --- a/bin/php-cs-fixer.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash -echo "Fixing src/ folder" -php-cs-fixer fix classification/ --level=symfony - -echo "Fixing tests/ folder" -php-cs-fixer fix regression/ --level=symfony diff --git a/classification/languageDetection.php b/classification/languageDetection.php index 2274d2d..43a50d5 100644 --- a/classification/languageDetection.php +++ b/classification/languageDetection.php @@ -1,4 +1,4 @@ -