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.
Completed
Push — master ( 3e29f4...a0257c )
by Gytis
03:40 queued 11s
created

ParamTypeSubject   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 9
dl 0
loc 19
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 10 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
     *
16
     * @return static
17
     */
18 4
    public static function fromParam(FunctionParam $param, ?ParamTag $tag, DocBlock $docBlock)
19
    {
20 4
        return new static(
21 4
            $tag ? $tag->getType() : null,
22 4
            $param->getType(),
23 4
            $param->getValueType(),
24 4
            $tag ? $tag->getLine() : $param->getLine(),
25 4
            $param->getLine(),
26 4
            sprintf('parameter $%s', $param->getName()),
27 4
            $docBlock
28
        );
29
    }
30
}
31