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 @@ -