From 63c63dfba2b8b16599369ea8528585f1af6d5b70 Mon Sep 17 00:00:00 2001 From: Arkadiusz Kondas Date: Wed, 1 Mar 2017 10:16:15 +0100 Subject: [PATCH] Add no_unused_imports rule to cs-fixer --- .php_cs | 1 + src/Phpml/Classification/Ensemble/Bagging.php | 2 -- src/Phpml/Classification/Ensemble/RandomForest.php | 2 -- src/Phpml/Classification/Linear/Adaline.php | 3 --- src/Phpml/Classification/Linear/Perceptron.php | 1 - src/Phpml/Classification/WeightedClassifier.php | 6 +++--- tests/Phpml/Classification/Ensemble/BaggingTest.php | 1 - tests/Phpml/Classification/Ensemble/RandomForestTest.php | 3 --- 8 files changed, 4 insertions(+), 15 deletions(-) diff --git a/.php_cs b/.php_cs index 417cafa..5a2dd57 100644 --- a/.php_cs +++ b/.php_cs @@ -7,6 +7,7 @@ return PhpCsFixer\Config::create() 'array_syntax' => ['syntax' => 'short'], 'blank_line_after_opening_tag' => true, 'single_blank_line_before_namespace' => true, + 'no_unused_imports' => true ]) ->setFinder( PhpCsFixer\Finder::create() diff --git a/src/Phpml/Classification/Ensemble/Bagging.php b/src/Phpml/Classification/Ensemble/Bagging.php index d579b24..1bb2027 100644 --- a/src/Phpml/Classification/Ensemble/Bagging.php +++ b/src/Phpml/Classification/Ensemble/Bagging.php @@ -6,10 +6,8 @@ namespace Phpml\Classification\Ensemble; use Phpml\Helper\Predictable; use Phpml\Helper\Trainable; -use Phpml\Math\Statistic\Mean; use Phpml\Classification\Classifier; use Phpml\Classification\DecisionTree; -use Phpml\Classification\NaiveBayes; class Bagging implements Classifier { diff --git a/src/Phpml/Classification/Ensemble/RandomForest.php b/src/Phpml/Classification/Ensemble/RandomForest.php index 025badf..273eb21 100644 --- a/src/Phpml/Classification/Ensemble/RandomForest.php +++ b/src/Phpml/Classification/Ensemble/RandomForest.php @@ -4,9 +4,7 @@ declare(strict_types=1); namespace Phpml\Classification\Ensemble; -use Phpml\Classification\Ensemble\Bagging; use Phpml\Classification\DecisionTree; -use Phpml\Classification\NaiveBayes; use Phpml\Classification\Classifier; class RandomForest extends Bagging diff --git a/src/Phpml/Classification/Linear/Adaline.php b/src/Phpml/Classification/Linear/Adaline.php index 13674f1..194451a 100644 --- a/src/Phpml/Classification/Linear/Adaline.php +++ b/src/Phpml/Classification/Linear/Adaline.php @@ -4,10 +4,7 @@ declare(strict_types=1); namespace Phpml\Classification\Linear; -use Phpml\Helper\Predictable; -use Phpml\Helper\Trainable; use Phpml\Classification\Classifier; -use Phpml\Classification\Linear\Perceptron; class Adaline extends Perceptron { diff --git a/src/Phpml/Classification/Linear/Perceptron.php b/src/Phpml/Classification/Linear/Perceptron.php index bc31da1..e2c684d 100644 --- a/src/Phpml/Classification/Linear/Perceptron.php +++ b/src/Phpml/Classification/Linear/Perceptron.php @@ -5,7 +5,6 @@ declare(strict_types=1); namespace Phpml\Classification\Linear; use Phpml\Helper\Predictable; -use Phpml\Helper\Trainable; use Phpml\Classification\Classifier; use Phpml\Preprocessing\Normalizer; diff --git a/src/Phpml/Classification/WeightedClassifier.php b/src/Phpml/Classification/WeightedClassifier.php index 36a294e..c0ec045 100644 --- a/src/Phpml/Classification/WeightedClassifier.php +++ b/src/Phpml/Classification/WeightedClassifier.php @@ -1,9 +1,9 @@ -