Name   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
dl 0
loc 23
ccs 5
cts 5
cp 1
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __toString() 0 3 1
A __construct() 0 3 1
1
<?php
2
3
declare ( strict_types = 1 );
4
5
namespace Ch0c01dxyz\InstaToken\Objects;
6
7
/**
8
 * @author Egar Rizki <[email protected]>
9
 */
10
class Name
11
{
12
	/**
13
	 * @var name
14
	 */
15
	protected $name;
16
17
	/**
18
	 * Name constructor
19
	 *
20
	 * @param string $n
21
	 */
22 2
	public function __construct ( string $n )
23
	{
24 2
		$this->name = $n;
0 ignored issues
show
Documentation Bug introduced by
It seems like $n of type string is incompatible with the declared type Ch0c01dxyz\InstaToken\Objects\name of property $name.

Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..

Loading history...
25 2
	}
26
27
	/**
28
	 * @return string
29
	 */
30 2
	public function __toString () : string
31
	{
32 2
		return $this->name;
33
	}
34
}