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

IntConverter   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 2
c 2
b 0
f 0
lcom 0
cbo 0
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
class IntConverter implements ValueConverter
6
{
7
    public function convert($rawValue)
8
    {
9
        if (is_numeric($rawValue)) {
10
            return (int) $rawValue;
11
        }
12
13
        return;
14
    }
15
}
16