PeerFactoryException   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 7
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 1
dl 0
loc 7
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A becauseNoPeerFound() 0 5 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Zored\Telegram\Entity\Control\Peer\Exception;
6
7
use RuntimeException;
8
use Zored\Telegram\Entity\General\AbstractEntity;
9
10
class PeerFactoryException extends RuntimeException
11
{
12
    public static function becauseNoPeerFound(AbstractEntity $entity): self
13
    {
14
        $class = get_class($entity);
15
16
        return new self("No peer found for '$class'.");
17
    }
18
}
19