Passed
Branch master (203e41)
by Nate
02:00
created

NoopStringConverter   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A convert() 0 4 1
1
<?php
2
/*
3
 * Copyright (c) Nate Brunette.
4
 * Distributed under the MIT License (http://opensource.org/licenses/MIT)
5
 */
6
7
declare(strict_types=1);
8
9
namespace Tebru\Retrofit\Internal\Converter;
10
11
use Tebru\Retrofit\StringConverter;
12
13
/**
14
 * Class NoopStringConverter
15
 *
16
 * @author Nate Brunette <[email protected]>
17
 */
18
class NoopStringConverter implements StringConverter
19
{
20
    /**
21
     * Only types that are known to be strings should be passed to this converter,
22
     * so we can just return the value.
23
     *
24
     * @param string $value
25
     * @return string
26
     */
27 3
    public function convert($value): string
28
    {
29 3
        return $value;
30
    }
31
}
32