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

Passed
Pull Request — master (#1234)
by Henrique
08:28
created

StandardParameterStringifier   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 3
dl 0
loc 12
rs 10
c 0
b 0
f 0
wmc 3

1 Method

Rating   Name   Duplication   Size   Complexity  
A stringifyParameter() 0 7 3
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;
15
16
use function is_string;
17
use function Respect\Stringifier\stringify;
18
19
final class StandardParameterStringifier implements ParameterStringifier
20
{
21
    /**
22
     * {@inheritDoc}
23
     */
24
    public function stringifyParameter(string $name, $value): string
25
    {
26
        if ($name === 'name' && is_string($value)) {
27
            return $value;
28
        }
29
30
        return stringify($value);
31
    }
32
}
33