for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types = 1);
namespace Kata\Algorithm;
final class FindCoupleByAgeDifference
{
/** @var CoupleCollection[] */
private $couples;
public function __construct(array $people)
$this->couples = CoupleCollection::fromPeopleArray($people);
}
public function find(int $finder_criteria): Couple
if (count($this->couples) < 1) {
return new Couple();
return $this->couples->getCoupleByAgeCriteria($finder_criteria);
getCoupleByAgeCriteria
$this->couples
array<integer,object<Kat...ithm\CoupleCollection>>
Methods can only be called on objects. This check looks for methods being called on variables that have been inferred to never be objects.
Methods can only be called on objects. This check looks for methods being called on variables that have been inferred to never be objects.