Completed
Push — master ( 13e9af...c4aa22 )
by Rémi
03:22
created

UnableToCreateUserEventTextExtractor   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
c 1
b 0
f 0
lcom 0
cbo 1
dl 0
loc 18
ccs 0
cts 4
cp 0
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A extractMessage() 0 8 2
1
<?php
2
3
namespace MessageApp\Message\TextExtractor;
4
5
use MessageApp\Event\UnableToCreateUserEvent;
6
7
class UnableToCreateUserEventTextExtractor implements MessageTextExtractor
8
{
9
    /**
10
     * Extract the message from the game result.
11
     *
12
     * @param  object $object
13
     * @param  string $languageIso
14
     * @return string
15
     */
16
    public function extractMessage($object, $languageIso)
17
    {
18
        if (!$object instanceof UnableToCreateUserEvent) {
19
            return null;
20
        }
21
22
        return $object->getReason();
23
    }
24
}
25