ThrowImmutable   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A throwImmutable() 0 4 1
1
<?php
2
3
namespace Shrikeh\PagerDuty\Collection\Traits;
4
5
use Shrikeh\PagerDuty\Collection\Exception\ImmutableCollectionException;
6
7
trait ThrowImmutable
8
{
9
    /**
10
     * Overrides the default DomainException thrown for immutable collections.
11
     * @throws Shrikeh\PagerDuty\Collection\Exception\ImmutableCollectionException
12
     */
13
    protected function throwImmutable($msg, $errorCode = null)
14
    {
15
        throw new ImmutableCollectionException($msg, $errorCode);
16
    }
17
}
18