Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
n/a
0 / 0
n/a
0 / 0
CRAP
n/a
0 / 0
1<?php
2
3declare(strict_types=1);
4
5namespace Celema\Boiler\Proxy;
6
7/**
8 * @api
9 *
10 * @template-covariant TValue
11 */
12interface Proxy
13{
14    /** @return TValue */
15    public function unwrap(): mixed;
16
17    /**
18     * Strict comparison of the wrapped value against `$other`, unwrapping
19     * `$other` first when it is a proxy itself. `===` compares the proxy
20     * object and is therefore always false against a plain value.
21     */
22    public function is(mixed $other): bool;
23
24    /**
25     * Whether the wrapped value is identical to an element of `$haystack`,
26     * comparing each element with the semantics of `is()`.
27     *
28     * @param ArrayProxy|array<array-key, mixed> $haystack
29     */
30    public function in(ArrayProxy|array $haystack): bool;
31}