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

FieldParameter   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 1
dl 0
loc 14
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A getValue() 0 4 1
1
<?php declare(strict_types = 1);
2
3
namespace PeeHaa\AsyncTwitter\Request;
4
5
class FieldParameter extends Parameter
6
{
7
    public function __construct(string $key, string $value, string $type = 'text/plain')
8
    {
9
        parent::__construct($key, $type);
10
11
        $this->value = $value;
0 ignored issues
show
Bug introduced by
The property value does not exist. Did you maybe forget to declare it?

In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:

class MyClass { }

$x = new MyClass();
$x->foo = true;

Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion:

class MyClass {
    public $foo;
}

$x = new MyClass();
$x->foo = true;
Loading history...
12
    }
13
14
    public function getValue(): string
15
    {
16
        return $this->value;
17
    }
18
}
19