LevelStub::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\Level;
6
use PhpGitHooks\Module\Tests\Infrastructure\Stub\RandomStubInterface;
7
use PhpGitHooks\Module\Tests\Infrastructure\Stub\StubCreator;
8
9
class LevelStub implements RandomStubInterface
10
{
11
    /**
12
     * @param bool $value
13
     *
14
     * @return Level
15
     */
16
    public static function create($value)
17
    {
18
        return new Level($value);
19
    }
20
21
    /**
22
     * @return Level
23
     */
24
    public static function random()
25
    {
26
        return self::create(StubCreator::faker()->boolean);
27
    }
28
}
29