Completed
Push — master ( 589fec...539028 )
by Milan
07:58
created

FioAccount::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 5
c 0
b 0
f 0
rs 10
cc 1
nc 1
nop 2
1
<?php declare(strict_types=1);
2
3
namespace h4kuna\Fio\Account;
4
5
class FioAccount
6
{
7
8
	/** @var Bank */
9
	private $account;
10
11
	/** @var string */
12
	private $token;
13
14
15
	public function __construct(string $account, string $token)
16
	{
17
		$this->account = Bank::createNational($account);
0 ignored issues
show
Documentation Bug introduced by
It seems like \h4kuna\Fio\Account\Bank::createNational($account) of type object<self> is incompatible with the declared type object<h4kuna\Fio\Account\Bank> of property $account.

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...
18
		$this->token = $token;
19
	}
20
21
22
	public function getAccount(): string
23
	{
24
		return $this->account->getAccount();
25
	}
26
27
28
	public function getBankCode(): string
29
	{
30
		return $this->account->getBankCode();
31
	}
32
33
34
	public function getToken(): string
35
	{
36
		return $this->token;
37
	}
38
39
40
	public function __toString()
41
	{
42
		return $this->getAccount();
43
	}
44
45
}
46