Completed
Push — master ( c42e36...b38be8 )
by
unknown
08:24 queued 05:17
created

Parameter::getValue()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
crap 1
1
<?php declare(strict_types=1);
2
3
namespace PeeHaa\AsyncTwitter\Request;
4
5
abstract class Parameter
6
{
7
    private $key;
8
9
    private $type;
10
11 155
    public function __construct(string $key, string $type = 'text/plain')
12
    {
13 155
        $this->key   = $key;
0 ignored issues
show
Coding Style introduced by
Equals sign not aligned with surrounding assignments; expected 2 spaces but found 3 spaces

This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line.

To visualize

$a = "a";
$ab = "ab";
$abc = "abc";

will produce issues in the first and second line, while this second example

$a   = "a";
$ab  = "ab";
$abc = "abc";

will produce no issues.

Loading history...
14 155
        $this->type = $type;
15 155
    }
16
17 143
    public function getKey(): string
18
    {
19 143
        return $this->key;
20
    }
21
22 142
    public function getType(): string
23
    {
24 142
        return $this->type;
25
    }
26
}
27