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

IntConverter::convert()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 8
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
c 2
b 0
f 0
dl 0
loc 8
rs 9.4286
cc 2
eloc 4
nc 2
nop 1
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