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 (#801)
by Timur
22:04
created

PhpTypeGuesser::resolveTypeFromPhpType()   B

Complexity

Conditions 8
Paths 8

Size

Total Lines 16
Code Lines 14

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 1 Features 0
Metric Value
cc 8
eloc 14
c 1
b 1
f 0
nc 8
nop 1
dl 0
loc 16
rs 8.4444
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Overblog\GraphQLBundle\Config\Parser\MetadataParser\TypeGuesser;
6
7
abstract class PhpTypeGuesser extends TypeGuesser
8
{
9
    /**
10
     * Convert a PHP Builtin type to a GraphQL type.
11
     */
12
    protected function resolveTypeFromPhpType(string $phpType): ?string
13
    {
14
        switch ($phpType) {
15
            case 'boolean':
16
            case 'bool':
17
                return 'Boolean';
18
            case 'integer':
19
            case 'int':
20
                return 'Int';
21
            case 'float':
22
            case 'double':
23
                return 'Float';
24
            case 'string':
25
                return 'String';
26
            default:
27
                return null;
28
        }
29
    }
30
}
31