Completed
Push — master ( a5d24e...028b40 )
by Gabriel
02:43
created

GroupValidator::__construct()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 8
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 8
rs 9.4285
cc 2
eloc 5
nc 2
nop 1
1
<?php
2
3
namespace Sinergi\Users\Group;
4
5
use Interop\Container\ContainerInterface;
6
use Sinergi\Users\Container;
7
8
class GroupValidator implements GroupValidatorInterface
9
{
10
    private $container;
11
12
    public function __construct(ContainerInterface $container)
13
    {
14
        if ($container instanceof Container) {
15
            $this->container = $container;
16
        } else {
17
            $this->container = new Container($container);
18
        }
19
    }
20
21
    public function __invoke(GroupEntityInterface $user): array
22
    {
23
        $errors = [];
24
        return $errors;
25
    }
26
}
27