Completed
Branch delegated-factory (41b3c7)
by Albert
02:04
created

UseDelegatedValidatorTrait   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A setDelegatedValidator() 0 3 1
A getDelegatedValidator() 0 4 1
1
<?php
2
3
namespace Proengsoft\JsValidation\Support;
4
5
trait UseDelegatedValidatorTrait
6
{
7
8
    /**
9
     * Delegated validator
10
     *
11
     * \Proengsoft\JsValidation\Support\DelegatedValidator $validator
12
     */
13
    protected $validator;
14
15
16
    /**
17
     * Sets delegated Validator instance.
18
     *
19
     * @param \Proengsoft\JsValidation\Support\DelegatedValidator $validator
20
     */
21
    public function setDelegatedValidator(DelegatedValidator $validator) {
22
        $this->validator = $validator;
23
    }
24
25
    /**
26
     *  Gets current DelegatedValidator instance
27
     * @return \Proengsoft\JsValidation\Support\DelegatedValidator
28
     */
29
    public function getDelegatedValidator()
30
    {
31
        return $this->validator;
32
    }
33
34
}