PhpMdStub::random()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
namespace PhpGitHooks\Module\Configuration\Tests\Stub;
4
5
use PhpGitHooks\Module\Configuration\Domain\Enabled;
6
use PhpGitHooks\Module\Configuration\Domain\PhpMd;
7
use PhpGitHooks\Module\Configuration\Domain\PhpMdOptions;
8
use PhpGitHooks\Module\Configuration\Domain\Undefined;
9
use PhpGitHooks\Module\Tests\Infrastructure\Stub\RandomStubInterface;
10
11
class PhpMdStub implements RandomStubInterface
12
{
13
    /**
14
     * @param Undefined    $undefined
15
     * @param Enabled      $enabled
16
     * @param PhpMdOptions $options
17
     *
18
     * @return PhpMd
19
     */
20
    public static function create(Undefined $undefined, Enabled $enabled, PhpMdOptions $options)
21
    {
22
        return new PhpMd($undefined, $enabled, $options);
23
    }
24
25
    /**
26
     * @return PhpMd
27
     */
28
    public static function random()
29
    {
30
        return self::create(new Undefined(false), EnabledStub::random(), PhpMdOptionsStub::random());
31
    }
32
33
    /**
34
     * @return PhpMd
35
     */
36
    public static function createEnabled()
37
    {
38
        return self::create(new Undefined(false), EnabledStub::create(true), PhpMdOptionsStub::create(null));
39
    }
40
}
41