Scrutinizer GitHub App not installed

We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.

Install GitHub App

Completed
Push — master ( ab602a...3093d7 )
by Henrique
03:42
created

KeepOriginalStringName::stringify()   A

Complexity

Conditions 3
Paths 2

Size

Total Lines 7
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 3
eloc 3
nc 2
nop 2
dl 0
loc 7
rs 10
c 0
b 0
f 0
1
<?php
2
3
/*
4
 * This file is part of Respect/Validation.
5
 *
6
 * (c) Alexandre Gomes Gaigalas <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the "LICENSE.md"
9
 * file that was distributed with this source code.
10
 */
11
12
declare(strict_types=1);
13
14
namespace Respect\Validation\Message\Stringifier;
15
16
use Respect\Validation\Message\ParameterStringifier;
17
use function is_string;
18
use function Respect\Stringifier\stringify;
19
20
final class KeepOriginalStringName implements ParameterStringifier
21
{
22
    /**
23
     * {@inheritDoc}
24
     */
25
    public function stringify(string $name, $value): string
26
    {
27
        if ($name === 'name' && is_string($value)) {
28
            return $value;
29
        }
30
31
        return stringify($value);
32
    }
33
}
34