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

GetPatternMethodNotAllowedTrait::getPattern()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 5
c 0
b 0
f 0
nc 1
nop 0
dl 0
loc 7
rs 10
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