Issues (29)

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

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