Add type hint and exceptions annotation

This commit is contained in:
Arkadiusz Kondas 2016-12-12 19:02:09 +01:00
parent d32197100e
commit 2363bbaa75
3 changed files with 5 additions and 3 deletions

View File

@ -60,6 +60,8 @@ class Cluster extends Point implements IteratorAggregate, Countable
* @param Point $point
*
* @return Point
*
* @throws \LogicException
*/
public function attach(Point $point)
{

View File

@ -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);

View File

@ -65,7 +65,7 @@ class Space extends SplObjectStorage
}
/**
* @param object $point
* @param Point $point
* @param null $data
*/
public function attach($point, $data = null)