GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

ParamTypeSubject   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 11
dl 0
loc 22
ccs 9
cts 9
cp 1
rs 10
c 1
b 0
f 0
wmc 3

1 Method

Rating   Name   Duplication   Size   Complexity  
A fromParam() 0 12 3
1
<?php
2
3
namespace Gskema\TypeSniff\Inspection\Subject;
4
5
use Gskema\TypeSniff\Core\DocBlock\DocBlock;
6
use Gskema\TypeSniff\Core\DocBlock\Tag\ParamTag;
7
use Gskema\TypeSniff\Core\Func\FunctionParam;
8
9
class ParamTypeSubject extends AbstractTypeSubject
10
{
11
    /**
12
     * @param FunctionParam $param
13
     * @param ParamTag|null $tag
14
     * @param DocBlock      $docBlock
15
     * @param string        $id
16
     *
17
     * @return static
18
     */
19 10
    public static function fromParam(FunctionParam $param, ?ParamTag $tag, DocBlock $docBlock, string $id)
20
    {
21 10
        return new static(
22 10
            $tag ? $tag->getType() : null,
23 10
            $param->getType(),
24 10
            $param->getValueType(),
25 10
            $tag ? $tag->getLine() : $param->getLine(),
26 10
            $param->getLine(),
27 10
            sprintf('parameter $%s', $param->getName()),
28
            $docBlock,
29 10
            $param->getAttributeNames(),
30
            $id
31
        );
32
    }
33
}
34