PhpMdStub   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 4

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 4
dl 0
loc 30
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A create() 0 4 1
A random() 0 4 1
A createEnabled() 0 4 1
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