GroupValidator   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 8 2
A __invoke() 0 5 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