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

getDelegatedValidator()   A

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
c 1
b 0
f 0
dl 0
loc 4
rs 10
nc 1
cc 1
eloc 2
nop 0
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
}