Validate   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
eloc 3
dl 0
loc 20
rs 10
c 0
b 0
f 0
ccs 4
cts 4
cp 1
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A arr() 0 3 1
A object() 0 3 1
1
<?php
2
/**
3
 * This file is part of graze/config-validation.
4
 *
5
 * Copyright (c) 2017 Nature Delivered Ltd. <https://www.graze.com>
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 *
10
 * @license https://github.com/graze/config-validation/blob/master/LICENSE.md
11
 * @link    https://github.com/graze/config-validation
12
 */
13
14
namespace Graze\ConfigValidation;
15
16
/**
17
 * Validate is a Facade / factory to wrap Array and Object methods to help with construction
18
 *
19
 * @package Graze\ConfigValidation
20
 */
21
class Validate
22
{
23
    /**
24
     * @param bool $allowUnassigned
25
     *
26
     * @return ObjectValidator
27
     */
28 2
    public static function object($allowUnassigned = true)
29
    {
30 2
        return new ObjectValidator($allowUnassigned);
31
    }
32
33
    /**
34
     * @param bool $allowUnassigned
35
     *
36
     * @return ArrayValidator
37
     */
38 2
    public static function arr($allowUnassigned = true)
39
    {
40 2
        return new ArrayValidator($allowUnassigned);
41
    }
42
}
43