1 | <?php |
||
17 | class File |
||
18 | { |
||
19 | /** |
||
20 | * File name template |
||
21 | * |
||
22 | * @var string |
||
23 | */ |
||
24 | const TEMPLATE_GENERATED = 'RET{CLIENT}-{DD.MM.YYYY-HH.MM.SS}.TXT'; |
||
25 | |||
26 | /** |
||
27 | * File name template |
||
28 | * |
||
29 | * @var string |
||
30 | */ |
||
31 | const TEMPLATE_PROCESSED = 'RET{CLIENT}-{DD.MM.YYYY-HH.MM.SS}.TXT'; |
||
32 | |||
33 | /** |
||
34 | * @var Header |
||
35 | */ |
||
36 | private $header; |
||
37 | |||
38 | /** |
||
39 | * @var ArrayObject |
||
40 | */ |
||
41 | private $cart; |
||
42 | |||
43 | /** |
||
44 | * @var Footer |
||
45 | */ |
||
46 | private $footer; |
||
47 | |||
48 | /** |
||
49 | * @var array |
||
50 | */ |
||
51 | private $rows = []; |
||
52 | |||
53 | /** |
||
54 | * @var Customer |
||
55 | */ |
||
56 | private $customer; |
||
57 | |||
58 | /** |
||
59 | * @var DateTime |
||
60 | */ |
||
61 | private $now; |
||
62 | |||
63 | /** |
||
64 | * @param Customer $customer |
||
65 | * @param DateTime $date |
||
66 | * @param string $storageDir |
||
67 | */ |
||
68 | 1 | public function __construct(Customer $customer, DateTime $date, $storageDir = null) |
|
82 | |||
83 | /** |
||
84 | * Create the file name |
||
85 | * |
||
86 | * @return string |
||
87 | */ |
||
88 | 1 | private function createFilename($type = self::TEMPLATE_GENERATED) |
|
102 | |||
103 | /** |
||
104 | * @return Header |
||
105 | */ |
||
106 | 1 | public function getHeader() |
|
113 | |||
114 | /** |
||
115 | * @return Footer |
||
116 | */ |
||
117 | 1 | public function getFooter() |
|
129 | |||
130 | /** |
||
131 | * @return \ArrayObject |
||
132 | */ |
||
133 | 1 | public function getCart() |
|
146 | |||
147 | /** |
||
148 | * @return mixed |
||
149 | */ |
||
150 | 1 | public function getAll() |
|
158 | } |
||
159 |
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..