| 1 | <?php |
||
| 9 | class Charge |
||
| 10 | { |
||
| 11 | /** |
||
| 12 | * Billet |
||
| 13 | * |
||
| 14 | * @const string |
||
| 15 | */ |
||
| 16 | const BILLET = 'B'; |
||
| 17 | |||
| 18 | /** |
||
| 19 | * Credit card |
||
| 20 | * |
||
| 21 | * @const string |
||
| 22 | */ |
||
| 23 | const CREDIT_CARD = 'C'; |
||
| 24 | |||
| 25 | /** |
||
| 26 | * Debit on bank account |
||
| 27 | * |
||
| 28 | * @const string |
||
| 29 | */ |
||
| 30 | const DEBIT = 'D'; |
||
| 31 | |||
| 32 | /** |
||
| 33 | * Energy account |
||
| 34 | * |
||
| 35 | * @const string |
||
| 36 | */ |
||
| 37 | const ENERGY = 'E'; |
||
| 38 | |||
| 39 | /** |
||
| 40 | * Batch File |
||
| 41 | * |
||
| 42 | * @const string |
||
| 43 | */ |
||
| 44 | const BATCH_FILE = 'F'; |
||
| 45 | |||
| 46 | /** |
||
| 47 | * Payment Slip |
||
| 48 | * |
||
| 49 | * @const string |
||
| 50 | */ |
||
| 51 | const PAYMENT_SLIP = 'P'; |
||
| 52 | |||
| 53 | /** |
||
| 54 | * Charging type |
||
| 55 | * |
||
| 56 | * Types: |
||
| 57 | * - B = Boleto Bancário |
||
| 58 | * - E = Energia |
||
| 59 | * - C = Cartão de Crédito |
||
| 60 | * - D = Débito Automático |
||
| 61 | * - D = Arquivo de Remessa |
||
| 62 | * - P = Bloqueto |
||
| 63 | * |
||
| 64 | * @var string |
||
| 65 | */ |
||
| 66 | private $charging; |
||
| 67 | |||
| 68 | /** |
||
| 69 | * Occurrence |
||
| 70 | * |
||
| 71 | * @var Ocurrence |
||
| 72 | */ |
||
| 73 | private $occurrence; |
||
| 74 | |||
| 75 | /** |
||
| 76 | * Valid types |
||
| 77 | * |
||
| 78 | * @var array |
||
| 79 | */ |
||
| 80 | private $validTypes = [ |
||
| 81 | self::BILLET, |
||
| 82 | self::CREDIT_CARD, |
||
| 83 | self::DEBIT, |
||
| 84 | self::ENERGY, |
||
| 85 | self::BATCH_FILE, |
||
| 86 | self::PAYMENT_SLIP |
||
| 87 | ]; |
||
| 88 | |||
| 89 | 5 | public function __construct( |
|
| 96 | |||
| 97 | /** |
||
| 98 | * @return the $charging |
||
| 99 | */ |
||
| 100 | 1 | public function getCharging(): string |
|
| 104 | |||
| 105 | /** |
||
| 106 | * @param string $charging |
||
| 107 | */ |
||
| 108 | 2 | public function setCharging(string $charging) |
|
| 116 | |||
| 117 | /** |
||
| 118 | * @return Occurrence |
||
| 119 | */ |
||
| 120 | 1 | public function getOccurrence(): Occurrence |
|
| 124 | |||
| 125 | /** |
||
| 126 | * @param Occurrence $occurrence |
||
| 127 | */ |
||
| 128 | 1 | public function setOccurrence(Occurrence $occurrence) |
|
| 132 | } |
||
| 133 |
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..