Completed
Push — master ( 05d77e...ee005d )
by Pavel
06:28
created

ScalarNormalizer   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A normalize() 0 4 1
A supports() 0 4 1
1
<?php
2
3
namespace Bankiru\Seo\Destination\Normalizer;
4
5
use Bankiru\Seo\Destination\DestinationNormalizer;
6
7
final class ScalarNormalizer implements DestinationNormalizer
8
{
9
    /** {@inheritdoc} */
10 1
    public function normalize($item)
11
    {
12 1
        return (string)$item;
13
    }
14
15
    /** {@inheritdoc} */
16 1
    public function supports($item)
17
    {
18 1
        return is_scalar($item);
19
    }
20
}
21