diff --git a/src/Phpml/Exception/NormalizerException.php b/src/Phpml/Exception/NormalizerException.php index 5c7ced1..31abfeb 100644 --- a/src/Phpml/Exception/NormalizerException.php +++ b/src/Phpml/Exception/NormalizerException.php @@ -21,5 +21,4 @@ class NormalizerException extends \Exception { return new self('Fit is not allowed for this preprocessor.'); } - } diff --git a/src/Phpml/FeatureExtraction/TfIdfTransformer.php b/src/Phpml/FeatureExtraction/TfIdfTransformer.php index 17f5b8b..1e222d2 100644 --- a/src/Phpml/FeatureExtraction/TfIdfTransformer.php +++ b/src/Phpml/FeatureExtraction/TfIdfTransformer.php @@ -18,7 +18,7 @@ class TfIdfTransformer implements Transformer */ public function __construct(array $samples = null) { - if($samples) { + if ($samples) { $this->fit($samples); } } diff --git a/src/Phpml/FeatureExtraction/TokenCountVectorizer.php b/src/Phpml/FeatureExtraction/TokenCountVectorizer.php index 501263d..8d4a5ab 100644 --- a/src/Phpml/FeatureExtraction/TokenCountVectorizer.php +++ b/src/Phpml/FeatureExtraction/TokenCountVectorizer.php @@ -92,7 +92,7 @@ class TokenCountVectorizer implements Transformer foreach ($tokens as $token) { $index = $this->getTokenIndex($token); - if(false !== $index) { + if (false !== $index) { $this->updateFrequency($token); if (!isset($counts[$index])) { $counts[$index] = 0; diff --git a/src/Phpml/Preprocessing/Imputer.php b/src/Phpml/Preprocessing/Imputer.php index 424efa4..012bb79 100644 --- a/src/Phpml/Preprocessing/Imputer.php +++ b/src/Phpml/Preprocessing/Imputer.php @@ -27,14 +27,14 @@ class Imputer implements Preprocessor private $axis; /** - * @var $samples + * @var */ private $samples; /** - * @param mixed $missingValue - * @param Strategy $strategy - * @param int $axis + * @param mixed $missingValue + * @param Strategy $strategy + * @param int $axis * @param array|null $samples */ public function __construct($missingValue = null, Strategy $strategy, int $axis = self::AXIS_COLUMN, array $samples = []) diff --git a/src/Phpml/Transformer.php b/src/Phpml/Transformer.php index 1accdda..f7ddd81 100644 --- a/src/Phpml/Transformer.php +++ b/src/Phpml/Transformer.php @@ -6,7 +6,6 @@ namespace Phpml; interface Transformer { - /** * @param array $samples */ diff --git a/tests/Phpml/FeatureExtraction/TokenCountVectorizerTest.php b/tests/Phpml/FeatureExtraction/TokenCountVectorizerTest.php index cf22b5c..3a5f7fe 100644 --- a/tests/Phpml/FeatureExtraction/TokenCountVectorizerTest.php +++ b/tests/Phpml/FeatureExtraction/TokenCountVectorizerTest.php @@ -78,7 +78,6 @@ class TokenCountVectorizerTest extends \PHPUnit_Framework_TestCase $vectorizer->transform($samples); $this->assertEquals($tokensCounts, $samples); - // word at least once in all samples $samples = [ 'Lorem ipsum dolor sit amet', diff --git a/tests/Phpml/Preprocessing/ImputerTest.php b/tests/Phpml/Preprocessing/ImputerTest.php index fce195b..c607510 100644 --- a/tests/Phpml/Preprocessing/ImputerTest.php +++ b/tests/Phpml/Preprocessing/ImputerTest.php @@ -172,5 +172,4 @@ class ImputerTest extends \PHPUnit_Framework_TestCase $this->assertEquals($imputeData, $data, '', $delta = 0.01); } - } diff --git a/tests/Phpml/Preprocessing/NormalizerTest.php b/tests/Phpml/Preprocessing/NormalizerTest.php index d01e62c..f0e21c9 100644 --- a/tests/Phpml/Preprocessing/NormalizerTest.php +++ b/tests/Phpml/Preprocessing/NormalizerTest.php @@ -79,5 +79,4 @@ class NormalizerTest extends \PHPUnit_Framework_TestCase $this->assertEquals($normalized, $samples, '', $delta = 0.01); } - }