Parameter   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 0
dl 0
loc 22
ccs 7
cts 7
cp 1
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getKey() 0 4 1
A getType() 0 4 1
A __construct() 0 5 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 221
    public function __construct(string $key, string $type = 'text/plain')
12
    {
13 221
        $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 221
        $this->type = $type;
15
    }
16
17 194
    public function getKey(): string
18
    {
19 194
        return $this->key;
20
    }
21
22 2
    public function getType(): string
23
    {
24 2
        return $this->type;
25
    }
26
}
27