blob: a82680559e5cb6e0ebbcfa3b38be0b140cf94251 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
<?php
declare(strict_types=1);
namespace Nsfisis\Waddiwasi\Structure\Types;
final readonly class ResultType
{
/**
* @param list<ValType> $types
*/
public function __construct(
public array $types,
) {
}
public function equals(ResultType $other): bool
{
if (count($this->types) !== count($other->types)) {
return false;
}
foreach ($this->types as $i => $type) {
if (!$type->equals($other->types[$i])) {
return false;
}
}
return true;
}
}
|