Factory   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
lcom 1
cbo 1
dl 0
loc 24
rs 10
c 1
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A setFormatValidator() 0 4 1
A getFormatValidators() 0 4 1
1
<?php
2
3
namespace Nicofuma\SwaggerBundle\JsonSchema\Constraints;
4
5
class Factory extends \JsonSchema\Constraints\Factory
6
{
7
    /** @var Format\FormatValidatorInterface[] */
8
    private $formatValidators;
9
10
    /**
11
     * Add a format validator.
12
     *
13
     * @param string $format
14
     * @param Format\FormatValidatorInterface $validator
15
     */
16
    public function setFormatValidator($format, Format\FormatValidatorInterface $validator)
17
    {
18
        $this->formatValidators[$format] = $validator;
19
    }
20
21
    /**
22
     * @return Format\FormatValidatorInterface[]
23
     */
24
    public function getFormatValidators()
25
    {
26
        return $this->formatValidators;
27
    }
28
}
29