Skip to content

Commit

Permalink
change hhvm to 3.12
Browse files Browse the repository at this point in the history
  • Loading branch information
akondas committed Jul 7, 2016
1 parent f3288c5 commit adc2d1c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ matrix:
php: '7.0'

- os: linux
php: hhvm
php: hhvm-3.12
env:
- HHVMPHP7="yes"

Expand Down
4 changes: 2 additions & 2 deletions src/Phpml/Classification/KNearestNeighbors.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit adc2d1c

Please sign in to comment.