Passed
Push — master ( 823aee...b9b37f )
by Alec
13:15 queued 12s
created

GetPatternMethodNotAllowedTrait   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 6
c 0
b 0
f 0
dl 0
loc 12
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A getPattern() 0 7 1
1
<?php
2
3
declare(strict_types=1);
4
// 11.03.23
5
6
namespace AlecRabbit\Spinner\Extras\Procedure\Mixin;
7
8
use AlecRabbit\Spinner\Exception\DomainException;
9
use Traversable;
10
11
trait GetPatternMethodNotAllowedTrait
12
{
13
    /**
14
     * @throws DomainException
15
     */
16
    final public function getPattern(): Traversable
17
    {
18
        throw new DomainException(
19
            sprintf(
20
                '%s can not have %s() method by design.',
21
                static::class,
22
                __FUNCTION__
23
            )
24
        );
25
    }
26
}
27