Passed
Push — master ( 7bd689...ed0e19 )
by butschster
16:50 queued 18s
created

Proxy   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
eloc 4
c 1
b 0
f 0
dl 0
loc 20
ccs 1
cts 1
cp 1
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 2 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Spiral\Core\Attribute;
6
7
/**
8
 * The attribute is specified on a parameter that should be resolved from the container.
9
 * The parameter type MUST be an interface. When resolved by the container,
10
 * a generated proxy object of the specified interface will be passed as an argument,
11
 * which will redirect method calls to the real object obtained from the container.
12
 *
13
 * @internal We are testing this feature, it may be changed in the future.
14
 */
15
#[\Attribute(\Attribute::TARGET_PARAMETER)]
16
final class Proxy implements Plugin
17
{
18
    /**
19
     * @param bool $attach Attach the container to the proxy object.
20
     *        If TRUE, the same container that created the proxy object will be used when accessing the proxy object.
21
     *        If FALSE, the container of the current executing context (scope) will be used.
22
     * @internal
23
     */
24
    public bool $attachContainer = false;
25
26
    /**
27
     * @param bool $proxyOverloads Include `__call` and `__callStatic` methods in proxy to redirect method calls that
28
     *        are not defined in the interface.
29
     * @internal
30
     */
31
    public bool $proxyOverloads = false;
32
33 15
    public function __construct(
34
    ) {
35 15
    }
36
}
37