Total Complexity | 3 |
Total Lines | 30 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
16 | final class Append implements Monoid |
||
17 | { |
||
18 | /** |
||
19 | * @template C of object |
||
20 | * |
||
21 | * @param class-string<C> $class |
||
|
|||
22 | * |
||
23 | * @return self<C> |
||
24 | */ |
||
25 | public static function of(string $class = null): self |
||
26 | { |
||
27 | /** @var self<C> */ |
||
28 | return new self; |
||
29 | } |
||
30 | |||
31 | public function identity(): mixed |
||
32 | { |
||
33 | /** @var Sequence<T> */ |
||
34 | return Sequence::of(); |
||
35 | } |
||
36 | |||
37 | /** |
||
38 | * @param Sequence<T> $a |
||
39 | * @param Sequence<T> $b |
||
40 | * |
||
41 | * @return Sequence<T> |
||
42 | */ |
||
43 | public function combine(mixed $a, mixed $b): mixed |
||
46 | } |
||
47 | } |
||
48 |