Completed
Pull Request — master (#71)
by
unknown
02:35
created

PhpCsFixerOptionsStub::random()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace PhpGitHooks\Module\Configuration\Tests\Stub;
4
5
use PhpGitHooks\Module\Configuration\Domain\PhpCsFixerOptions;
6
use PhpGitHooks\Module\Tests\Infrastructure\Stub\RandomStubInterface;
7
use PhpGitHooks\Module\Tests\Infrastructure\Stub\StubCreator;
8
9
class PhpCsFixerOptionsStub implements RandomStubInterface
10
{
11
    /**
12
     * @param string $value
13
     *
14
     * @return PhpCsFixerOptions
15
     */
16
    public static function create($value)
17
    {
18
        return new PhpCsFixerOptions($value);
19
    }
20
21
    /**
22
     * @return PhpCsFixerOptions
23
     */
24
    public static function random()
25
    {
26
        return self::create(StubCreator::faker()->word);
27
    }
28
}
29