diff --git a/src/Phpml/Clustering/KMeans/Cluster.php b/src/Phpml/Clustering/KMeans/Cluster.php index c160b6c..28fa8af 100644 --- a/src/Phpml/Clustering/KMeans/Cluster.php +++ b/src/Phpml/Clustering/KMeans/Cluster.php @@ -60,6 +60,8 @@ class Cluster extends Point implements IteratorAggregate, Countable * @param Point $point * * @return Point + * + * @throws \LogicException */ public function attach(Point $point) { diff --git a/src/Phpml/Clustering/KMeans/Point.php b/src/Phpml/Clustering/KMeans/Point.php index a8d72e5..ce1c44e 100644 --- a/src/Phpml/Clustering/KMeans/Point.php +++ b/src/Phpml/Clustering/KMeans/Point.php @@ -53,11 +53,11 @@ class Point implements ArrayAccess } /** - * @param $points + * @param array $points * * @return mixed */ - public function getClosest($points) + public function getClosest(array $points) { foreach ($points as $point) { $distance = $this->getDistanceWith($point, false); diff --git a/src/Phpml/Clustering/KMeans/Space.php b/src/Phpml/Clustering/KMeans/Space.php index 40b1f1d..49ded31 100644 --- a/src/Phpml/Clustering/KMeans/Space.php +++ b/src/Phpml/Clustering/KMeans/Space.php @@ -65,7 +65,7 @@ class Space extends SplObjectStorage } /** - * @param object $point + * @param Point $point * @param null $data */ public function attach($point, $data = null)