| 1 | <?php |
||
| 11 | class CreditCard |
||
| 12 | { |
||
| 13 | const AMEX = 38; |
||
| 14 | const MASTERCARD = 39; |
||
| 15 | const HIPERCARD = 40; |
||
| 16 | const DINNERS = 41; |
||
| 17 | const DISCOVER = 45; |
||
| 18 | const VISA = 42; |
||
| 19 | const AURA = 51; |
||
| 20 | const ELO = 60; |
||
| 21 | const GOODCARD = 61; |
||
| 22 | const JCB = 62; |
||
| 23 | const MAIS = 63; |
||
| 24 | const CABAL = 64; |
||
| 25 | const SOROCRED = 65; |
||
| 26 | const SICREDI = 66; |
||
| 27 | const COOPERCRED = 67; |
||
| 28 | const AVISTA = 68; |
||
| 29 | |||
| 30 | /** |
||
| 31 | * |
||
| 32 | * @var numeric |
||
| 33 | */ |
||
| 34 | private $number; |
||
| 35 | |||
| 36 | /** |
||
| 37 | * |
||
| 38 | * @var DateTime |
||
| 39 | */ |
||
| 40 | private $validate; |
||
| 41 | |||
| 42 | /** |
||
| 43 | * |
||
| 44 | * @var numeric |
||
| 45 | */ |
||
| 46 | private $security; |
||
| 47 | |||
| 48 | /** |
||
| 49 | * @var numeric |
||
| 50 | */ |
||
| 51 | private $flag; |
||
| 52 | |||
| 53 | /** |
||
| 54 | * Constructor |
||
| 55 | */ |
||
| 56 | 8 | public function __construct(DateTime $validate = null) |
|
| 60 | |||
| 61 | /** |
||
| 62 | * @return the $number |
||
| 63 | */ |
||
| 64 | 1 | public function getNumber(): string |
|
| 68 | |||
| 69 | /** |
||
| 70 | * @param string $number |
||
| 71 | */ |
||
| 72 | 1 | public function setNumber(string $number) |
|
| 76 | |||
| 77 | /** |
||
| 78 | * @return the $validate |
||
| 79 | */ |
||
| 80 | 1 | public function getValidate(): DateTime |
|
| 84 | |||
| 85 | /** |
||
| 86 | * @param DateTime $validate |
||
| 87 | */ |
||
| 88 | 1 | public function setValidate(DateTime $validate) |
|
| 92 | |||
| 93 | /** |
||
| 94 | * @return the $security |
||
| 95 | */ |
||
| 96 | 1 | public function getSecurityNumber(): string |
|
| 100 | |||
| 101 | /** |
||
| 102 | * @param string $security |
||
| 103 | */ |
||
| 104 | 1 | public function setSecurityNumber(string $security) |
|
| 108 | |||
| 109 | /** |
||
| 110 | * @return int |
||
| 111 | */ |
||
| 112 | 1 | public function getFlag(): int |
|
| 116 | |||
| 117 | /** |
||
| 118 | * @param int $flag |
||
| 119 | */ |
||
| 120 | 1 | public function setFlag(int $flag) |
|
| 124 | } |
||
| 125 |
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..