$params * @param list $results */ public function __construct( public array $params, public array $results, ) { } public function equals(self $other): bool { if (count($this->params) !== count($other->params)) { return false; } if (count($this->results) !== count($other->results)) { return false; } foreach ($this->params as $i => $type) { if ($type !== $other->params[$i]) { return false; } } foreach ($this->results as $i => $type) { if ($type !== $other->results[$i]) { return false; } } return true; } }