StubCreator::faker()   A
last analyzed

Complexity

Conditions 2
Paths 2

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 2
nc 2
nop 0
1
<?php
2
3
namespace PhpGitHooks\Module\Tests\Infrastructure\Stub;
4
5
use Faker\Factory;
6
use Faker\Generator;
7
8
class StubCreator
9
{
10
    /**
11
     * @var Generator
12
     */
13
    private static $faker;
14
    /**
15
     * @return Generator
16
     */
17
    public static function faker()
18
    {
19
        return self::$faker = self::$faker ?: Factory::create();
20
    }
21
}
22