Fixture   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 4
lcom 1
cbo 2
dl 0
loc 23
ccs 0
cts 15
cp 0
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getObjectName() 0 8 2
A getProcessor() 0 4 1
A getName() 0 4 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Shapin\Datagen\Stripe;
6
7
use Shapin\Datagen\Fixture as BaseFixture;
8
use Shapin\Datagen\Stripe\Exception\NoObjectNameDefinedException;
9
10
abstract class Fixture extends BaseFixture implements FixtureInterface
11
{
12
    protected static $objectName;
13
14
    public function getObjectName(): string
15
    {
16
        if (null === static::$objectName) {
17
            throw new NoObjectNameDefinedException(static::class);
18
        }
19
20
        return static::$objectName;
21
    }
22
23
    public function getProcessor(): string
24
    {
25
        return 'stripe';
26
    }
27
28
    public function getName(): string
29
    {
30
        return $this->getObjectName();
31
    }
32
}
33