Completed
Push — master ( 279fbd...ad3cda )
by Pieter
15s queued 12s
created

MessageGetter::getPriority()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 3
rs 10
1
<?php
2
3
4
namespace W2w\Lib\Apie\Plugins\Core\ObjectAccess\Getters;
5
6
use Symfony\Component\PropertyInfo\Type;
7
use W2w\Lib\ApieObjectAccessNormalizer\Getters\GetterInterface;
8
9
/**
10
 * Maps getMessage from exceptions.
11
 *
12
 * @internal
13
 */
14
class MessageGetter implements GetterInterface
15
{
16
    public function getName(): string
17
    {
18
        return 'message';
19
    }
20
21
    public function getValue($object)
22
    {
23
        return $object->getMessage();
24
    }
25
26
    public function toType(): ?Type
27
    {
28
        return new Type(Type::BUILTIN_TYPE_STRING);
29
    }
30
31
    public function getPriority(): int
32
    {
33
        return 0;
34
    }
35
}
36