Passed
Push — master ( e66a3e...15c60f )
by Paweł
04:21
created

OptionalUserAwareTrait   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 2
eloc 4
c 1
b 0
f 1
dl 0
loc 12
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getUser() 0 3 1
A setUser() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace App\Model;
6
7
use Symfony\Component\Security\Core\User\UserInterface as SymfonyUserInterface;
8
9
trait OptionalUserAwareTrait
10
{
11
    protected $user;
12
13
    public function getUser(): ?SymfonyUserInterface
14
    {
15
        return $this->user;
16
    }
17
18
    public function setUser(?SymfonyUserInterface $user): void
19
    {
20
        $this->user = $user;
21
    }
22
}
23