Completed
Push — master ( 42a15b...d491ac )
by Paweł
02:03
created

UuidConverter   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 2
c 2
b 0
f 0
lcom 0
cbo 1
dl 0
loc 11
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A convert() 0 8 2
1
<?php
2
3
namespace Clearcode\CommandBusConsole\ValueConverter;
4
5
use Ramsey\Uuid\Uuid;
6
7
class UuidConverter implements ValueConverter
8
{
9
    public function convert($rawValue)
10
    {
11
        try {
12
            return Uuid::fromString($rawValue);
13
        } catch (\Exception $e) {
14
            return;
15
        }
16
    }
17
}
18