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 *
12 * @psalm-inheritors ArrayProxy|IteratorProxy|ObjectProxy|StringProxy
13 */
14interface Proxy
15{
16    /** @return TValue */
17    public function unwrap(): mixed;
18
19    /**
20     * Strict comparison of the wrapped value against `$other`, unwrapping
21     * `$other` first when it is a proxy itself. `===` compares the proxy
22     * object and is therefore always false against a plain value.
23     */
24    public function is(mixed $other): bool;
25
26    /**
27     * Whether the wrapped value is identical to an element of `$haystack`,
28     * comparing each element with the semantics of `is()`.
29     *
30     * @param ArrayProxy|array<array-key, mixed> $haystack
31     */
32    public function in(ArrayProxy|array $haystack): bool;
33}