Completed
Push — master ( 1b9783...a1719c )
by James Ekow Abaka
01:39
created

DefaultValidatorFactory::createModelValidator()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 6
rs 9.4285
cc 1
eloc 4
nc 1
nop 2
1
<?php
2
3
namespace ntentan\nibii\factories;
4
5
use ntentan\nibii\DefaultValidator;
6
use ntentan\nibii\interfaces\ValidatorFactoryInterface;
7
use ntentan\nibii\RecordWrapper;
8
9
/**
10
 * Description of DefaultModelValidatorFactory
11
 *
12
 * @author ekow
13
 */
14
class DefaultValidatorFactory implements ValidatorFactoryInterface
15
{
16
    public function createModelValidator(RecordWrapper $model, $mode)
17
    {
18
        $validator = new DefaultValidator($model, $mode);
19
        $validator->extractRules();
20
        return $validator;
21
    }
22
}
23