Factory::getFormatValidators()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
dl 0
loc 4
rs 10
c 1
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
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