Passed
Push — master ( 331d4b...653c7c )
by Arkadiusz
02:19
created
src/Phpml/Clustering/KMeans/Space.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -16,6 +16,9 @@
 block discarded – undo
16 16
      */
17 17
     protected $dimension;
18 18
 
19
+    /**
20
+     * @param integer $dimension
21
+     */
19 22
     public function __construct($dimension)
20 23
     {
21 24
         if ($dimension < 1) {
Please login to merge, or discard this patch.
src/Phpml/NeuralNetwork/Node/Neuron.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -25,6 +25,9 @@
 block discarded – undo
25 25
      */
26 26
     protected $output;
27 27
 
28
+    /**
29
+     * @param ActivationFunction $activationFunction
30
+     */
28 31
     public function __construct(?ActivationFunction $activationFunction = null)
29 32
     {
30 33
         $this->activationFunction = $activationFunction ?: new ActivationFunction\Sigmoid();
Please login to merge, or discard this patch.
src/Phpml/NeuralNetwork/Training/Backpropagation.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@
 block discarded – undo
30 30
     }
31 31
 
32 32
     /**
33
-     * @param mixed $targetClass
33
+     * @param integer $targetClass
34 34
      */
35 35
     public function backpropagate(array $layers, $targetClass): void
36 36
     {
Please login to merge, or discard this patch.
src/Phpml/FeatureExtraction/TfIdfTransformer.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Phpml\FeatureExtraction;
6 6
 
@@ -13,7 +13,7 @@  discard block
 block discarded – undo
13 13
      */
14 14
     private $idf;
15 15
 
16
-    public function __construct(?array $samples = null)
16
+    public function __construct(? array $samples = null)
17 17
     {
18 18
         if ($samples) {
19 19
             $this->fit($samples);
Please login to merge, or discard this patch.
src/Phpml/FeatureExtraction/TokenCountVectorizer.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Phpml\FeatureExtraction;
6 6
 
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
         }
74 74
     }
75 75
 
76
-    private function transformSample(string &$sample): void
76
+    private function transformSample(string & $sample): void
77 77
     {
78 78
         $counts = [];
79 79
         $tokens = $this->tokenizer->tokenize($sample);
Please login to merge, or discard this patch.
src/Phpml/CrossValidation/Split.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Phpml\CrossValidation;
6 6
 
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
         return $this->testLabels;
62 62
     }
63 63
 
64
-    protected function seedGenerator(?int $seed = null): void
64
+    protected function seedGenerator(?int $seed = null) : void
65 65
     {
66 66
         if (null === $seed) {
67 67
             mt_srand();
Please login to merge, or discard this patch.
src/Phpml/Math/Statistic/Covariance.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Phpml\Math\Statistic;
6 6
 
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
      *
113 113
      * @param array|null $means
114 114
      */
115
-    public static function covarianceMatrix(array $data, ?array $means = null) : array
115
+    public static function covarianceMatrix(array $data, ? array $means = null) : array
116 116
     {
117 117
         $n = count($data[0]);
118 118
 
Please login to merge, or discard this patch.
src/Phpml/Metric/ConfusionMatrix.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,12 +1,12 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Phpml\Metric;
6 6
 
7 7
 class ConfusionMatrix
8 8
 {
9
-    public static function compute(array $actualLabels, array $predictedLabels, ?array $labels = null) : array
9
+    public static function compute(array $actualLabels, array $predictedLabels, ? array $labels = null) : array
10 10
     {
11 11
         $labels = $labels ? array_flip($labels) : self::getUniqueLabels($actualLabels);
12 12
         $matrix = self::generateMatrixWithZeros($labels);
Please login to merge, or discard this patch.
src/Phpml/NeuralNetwork/Network/MultilayerPerceptron.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Phpml\NeuralNetwork\Network;
6 6
 
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
         $this->addLayer(new Layer($nodes, Input::class));
133 133
     }
134 134
 
135
-    private function addNeuronLayers(array $layers, ?ActivationFunction $activationFunction = null): void
135
+    private function addNeuronLayers(array $layers, ?ActivationFunction $activationFunction = null) : void
136 136
     {
137 137
         foreach ($layers as $neurons) {
138 138
             $this->addLayer(new Layer($neurons, Neuron::class, $activationFunction));
Please login to merge, or discard this patch.