change hhvm to 3.12

This commit is contained in:
Arkadiusz Kondas 2016-07-07 23:38:11 +02:00
parent f3288c5946
commit adc2d1c81b
2 changed files with 3 additions and 3 deletions

View File

@ -8,7 +8,7 @@ matrix:
php: '7.0'
- os: linux
php: hhvm
php: hhvm-3.12
env:
- HHVMPHP7="yes"

View File

@ -27,13 +27,13 @@ class KNearestNeighbors implements Classifier
* @param int $k
* @param Distance|null $distanceMetric (if null then Euclidean distance as default)
*/
public function __construct(int $k = null, Distance $distanceMetric = null)
public function __construct(int $k = 3, Distance $distanceMetric = null)
{
if (null === $distanceMetric) {
$distanceMetric = new Euclidean();
}
$this->k = $k ?? 3;
$this->k = $k;
$this->samples = [];
$this->targets = [];
$this->distanceMetric = $distanceMetric;