Issues (29)

src/Objects/LocationId.php (2 issues)

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 LocationId
11
{
12
	/**
13
	 * @var locationId
14
	 */
15
	protected $locationId;
16
17
	/**
18
	 * Location ID constructor
19
	 *
20
	 * @param int $lid
21
	 */
22 3
	public function __construct ( int $lid )
23
	{
24 3
		$this->locationId = $lid;
0 ignored issues
show
Documentation Bug introduced by
It seems like $lid of type integer is incompatible with the declared type Ch0c01dxyz\InstaToken\Objects\locationId of property $locationId.

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 3
	}
26
27
	/**
28
	 * @return int
29
	 */
30
	public function __toInt () : int
31
	{
32
		return $this->locationId;
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this->locationId returns the type Ch0c01dxyz\InstaToken\Objects\locationId which is incompatible with the type-hinted return integer.
Loading history...
33
	}
34
35 3
	public function __toString () : string
36
	{
37 3
		return ( string ) $this->locationId;
38
	}
39
}