Validate::arr()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 1
dl 0
loc 3
rs 10
c 0
b 0
f 0
ccs 2
cts 2
cp 1
crap 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