Add no_unused_imports rule to cs-fixer

This commit is contained in:
Arkadiusz Kondas 2017-03-01 10:16:15 +01:00
parent c028a73985
commit 63c63dfba2
8 changed files with 4 additions and 15 deletions

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,9 +1,9 @@
<?php declare(strict_types=1);
<?php
declare(strict_types=1);
namespace Phpml\Classification;
use Phpml\Classification\Classifier;
abstract class WeightedClassifier implements Classifier
{
protected $weights = null;

View File

@ -7,7 +7,6 @@ namespace tests\Classification\Ensemble;
use Phpml\Classification\Ensemble\Bagging;
use Phpml\Classification\DecisionTree;
use Phpml\Classification\NaiveBayes;
use Phpml\Classification\KNearestNeighbors;
use Phpml\ModelManager;
use PHPUnit\Framework\TestCase;

View File

@ -7,9 +7,6 @@ namespace tests\Classification\Ensemble;
use Phpml\Classification\Ensemble\RandomForest;
use Phpml\Classification\DecisionTree;
use Phpml\Classification\NaiveBayes;
use Phpml\Classification\KNearestNeighbors;
use Phpml\ModelManager;
use tests\Classification\Ensemble\BaggingTest;
class RandomForestTest extends BaggingTest
{