ResolverTrait   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Importance

Changes 0
Metric Value
wmc 1
lcom 1
cbo 0
dl 0
loc 21
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A resolver() 0 6 1
1
<?php
2
3
namespace Psr7Middlewares\Utils;
4
5
use Psr7Middlewares\Transformers\ResolverInterface;
6
7
/**
8
 * Trait to provide a resolver to load transformers.
9
 */
10
trait ResolverTrait
11
{
12
    /**
13
     * @var ResolverInterface|null
14
     */
15
    protected $resolver;
16
17
    /**
18
     * Load the resolver.
19
     *
20
     * @param ResolverInterface $resolver
21
     *
22
     * @return self
23
     */
24
    public function resolver(ResolverInterface $resolver)
25
    {
26
        $this->resolver = $resolver;
27
28
        return $this;
29
    }
30
}
31