Passed
Push — master ( 8131e7...f70e95 )
by Egar
02:46
created

Action::__toInt()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 8
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 2.0625

Importance

Changes 0
Metric Value
dl 0
loc 8
ccs 3
cts 4
cp 0.75
rs 9.4285
c 0
b 0
f 0
cc 2
eloc 3
nc 2
nop 0
crap 2.0625
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 Action
11
{
12
	/**
13
	 * @var action
14
	 */
15
	protected $action;
16
17
	/**
18
	 * Action constructor
19
	 *
20
	 * @param string $ac
21
	 */
22 2
	public function __construct ( string $action )
23
	{
24 2
		$this->action = $action;
0 ignored issues
show
Documentation Bug introduced by
It seems like $action of type string is incompatible with the declared type Ch0c01dxyz\InstaToken\Objects\action of property $action.

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->action;
33
	}
34
}