Completed
Push — master ( dbc376...dd4c0c )
by Robert
06:26
created

JmsSerializerException::becauseOfWrongMapping()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 1
eloc 1
nc 1
nop 2
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Zored\Telegram\Serializer\Jms\Exception;
6
7
class JmsSerializerException extends \RuntimeException
8
{
9
    public static function becauseNotObjectReturned($result): self
10
    {
11
        return new self('Object should be deserializer - got ' . \gettype($result));
12
    }
13
14
    public static function becauseOfWrongMapping(string $before, string $after): self
15
    {
16
        return new self("$after class should extend $before to work properly.");
17
    }
18
}
19