Completed
Branch 1.x (cc7bb3)
by Akihito
02:00
created

ResourceInject::setResource()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2
Metric Value
dl 0
loc 4
ccs 0
cts 3
cp 0
rs 10
cc 1
eloc 2
nc 1
nop 1
crap 2
1
<?php
2
/**
3
 * This file is part of the BEAR.Sunday package
4
 *
5
 * @license http://opensource.org/licenses/MIT MIT
6
 */
7
namespace BEAR\Sunday\Inject;
8
9
use BEAR\Resource\ResourceInterface;
10
11
trait ResourceInject
12
{
13
    /**
14
     * @var ResourceInterface
15
     */
16
    protected $resource;
17
18
    /**
19
     * @param ResourceInterface $resource
20
     *
21
     * @Ray\Di\Di\Inject
22
     */
23
    public function setResource(ResourceInterface $resource)
24
    {
25
        $this->resource = $resource;
26
    }
27
}
28