FakeGetOption::checkRequireOption()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
c 0
b 0
f 0
rs 10
cc 1
eloc 2
nc 1
nop 1
1
<?php
2
/**
3
 * This file is part of graze/data-file
4
 *
5
 * Copyright (c) 2016 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/data-file/blob/master/LICENSE.md
11
 * @link    https://github.com/graze/data-file
12
 */
13
14
namespace Graze\DataFile\Test\Helper;
15
16
use Graze\DataFile\Helper\GetOptionTrait;
17
18
class FakeGetOption
19
{
20
    use GetOptionTrait;
21
22
    /**
23
     * @param array $options
24
     */
25
    public function setOptions(array $options)
26
    {
27
        $this->options = $options;
28
    }
29
30
    /**
31
     * @param string     $name
32
     * @param mixed|null $default
33
     *
34
     * @return mixed
35
     */
36
    public function checkGetOption($name, $default = null)
37
    {
38
        return $this->getOption($name, $default);
39
    }
40
41
    /**
42
     * @param string $name
43
     *
44
     * @return mixed
45
     */
46
    public function checkRequireOption($name)
47
    {
48
        return $this->requireOption($name);
49
    }
50
}
51