ImmutableException   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%
Metric Value
wmc 1
lcom 0
cbo 0
dl 0
loc 15
ccs 4
cts 4
cp 1
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A cannotModify() 0 7 1
1
<?php
2
3
namespace Equip\Structure;
4
5
use RuntimeException;
6
7
class ImmutableException extends RuntimeException
8
{
9
    /**
10
     * @param string $class
11
     *
12
     * @return static
13
     */
14 4
    public static function cannotModify($class)
15
    {
16 4
        return new static(sprintf(
17 4
            'Cannot modify immutable class `%s` using array methods',
18
            $class
19 4
        ));
20
    }
21
}
22