PeerFactoryException::becauseNoPeerFound()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

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