SessionInject::setSession()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 1
1
<?php
2
3
namespace Ray\SymfonySessionModule;
4
5
use Ray\Di\Di\Inject;
6
use Symfony\Component\HttpFoundation\Session\SessionInterface;
7
8
trait SessionInject
9
{
10
    /**
11
     * @var SessionInterface
12
     */
13
    protected $session;
14
15
    /**
16
     * @param SessionInterface $session
17
     *
18
     * @Inject
19
     */
20
    public function setSession(SessionInterface $session)
21
    {
22
        $this->session = $session;
23
    }
24
}
25