BaseUnitTestCase   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 9
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

Changes 0
Metric Value
wmc 2
lcom 1
cbo 2
dl 0
loc 9
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A faker() 0 4 2
1
<?php
2
declare(strict_types=1);
3
4
namespace PhpValueObjects\Tests;
5
6
use Faker\Factory;
7
use Faker\Generator;
8
use PHPUnit\Framework\TestCase;
9
10
abstract class BaseUnitTestCase extends TestCase
11
{
12
    private $faker;
13
14
    protected function faker(): Generator
15
    {
16
        return $this->faker = $this->faker ?: Factory::create();
17
    }
18
}
19