EntityExistsFactory   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 2
dl 0
loc 11
ccs 4
cts 4
cp 1
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A createValidator() 0 8 1
1
<?php
2
/**
3
 * Polder Knowledge / entityservice-zend-validator (https://polderknowledge.com)
4
 *
5
 * @link https://github.com/polderknowledge/entityservice-zend-validator for the canonical source repository
6
 * @copyright Copyright (c) 2016 Polder Knowledge (https://polderknowledge.com)
7
 * @license https://github.com/polderknowledge/entityservice-zend-validator/blob/master/LICENSE.md MIT
8
 */
9
10
namespace PolderKnowledge\EntityService\Validator\Service;
11
12
use PolderKnowledge\EntityService\EntityServiceInterface;
13
use PolderKnowledge\EntityService\Validator\EntityExists;
14
15
/**
16
 * Factory for EntityExists validator.
17
 */
18
final class EntityExistsFactory extends AbstractEntityValidatorFactory
19
{
20 3
    protected function createValidator(EntityServiceInterface $entityService, array $options = null)
21
    {
22 3
        $validator = new EntityExists($options);
23
24 3
        $validator->setEntityService($entityService);
25
26 3
        return $validator;
27
    }
28
}
29