EmbedResourceModule::configure()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 6
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 5
nc 1
nop 0
dl 0
loc 7
rs 10
c 1
b 0
f 0
ccs 6
cts 6
cp 1
crap 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace BEAR\Resource\Module;
6
7
use BEAR\Resource\Annotation\Embed;
8
use BEAR\Resource\EmbedInterceptor;
9
use Override;
10
use Ray\Di\AbstractModule;
11
12
/**
13
 * Provides EmbedInterceptor interceptor bindings
14
 */
15
final class EmbedResourceModule extends AbstractModule
16
{
17
    /**
18 51
     * {@inheritDoc}
19
     */
20 51
    #[Override]
21 51
    protected function configure(): void
22 51
    {
23 51
        $this->bindInterceptor(
24 51
            $this->matcher->any(),
25
            $this->matcher->annotatedWith(Embed::class),
26 51
            [EmbedInterceptor::class],
27
        );
28
    }
29
}
30