1 | <?php |
||
24 | class XlsHandler |
||
25 | { |
||
26 | /** |
||
27 | * Instance of the project |
||
28 | * |
||
29 | * @var Project |
||
30 | */ |
||
31 | protected $project; |
||
32 | |||
33 | /** |
||
34 | * Collection of project issues |
||
35 | * |
||
36 | * @var Project\Issue[] |
||
37 | */ |
||
38 | protected $issues; |
||
39 | |||
40 | /** |
||
41 | * Columns to export from the issues table |
||
42 | * |
||
43 | * @var array |
||
44 | */ |
||
45 | protected $columns = [ |
||
46 | 'id' => '', |
||
47 | 'title' => '', |
||
48 | 'time_quote' => '', |
||
49 | 'created_at' => '', |
||
50 | 'updated_at' => '', |
||
51 | 'closed_at' => '', |
||
52 | 'status' => '', |
||
53 | ]; |
||
54 | |||
55 | /** |
||
56 | * Columns in the output file |
||
57 | * |
||
58 | * @var array |
||
59 | */ |
||
60 | protected $header = [ |
||
61 | 'tinyissue.id', |
||
62 | 'tinyissue.title', |
||
63 | 'tinyissue.time_quote', |
||
64 | 'tinyissue.label_created', |
||
65 | 'tinyissue.updated', |
||
66 | 'tinyissue.label_closed', |
||
67 | 'tinyissue.status', |
||
68 | ]; |
||
69 | |||
70 | /** |
||
71 | * Set an instance of a project model |
||
72 | * |
||
73 | * @param Project $project |
||
74 | * |
||
75 | * @return $this |
||
76 | */ |
||
77 | public function setProject(Project $project) |
||
83 | |||
84 | /** |
||
85 | * @param Exporter $exporter |
||
86 | * |
||
87 | * @return void |
||
88 | */ |
||
89 | public function handle(Exporter $exporter) |
||
129 | |||
130 | /** |
||
131 | * Setup sheet global styles |
||
132 | * |
||
133 | * @param LaravelExcelWorksheet $sheet |
||
134 | * |
||
135 | * @return void |
||
136 | */ |
||
137 | protected function globalStyle(LaravelExcelWorksheet $sheet) |
||
143 | |||
144 | /** |
||
145 | * Sheet title in the first row |
||
146 | * |
||
147 | * @param CellWriter $cell |
||
148 | * |
||
149 | * @return void |
||
150 | */ |
||
151 | public function sheetTitle(CellWriter $cell) |
||
158 | |||
159 | /** |
||
160 | * Sheet data row |
||
161 | * |
||
162 | * @param LaravelExcelWorksheet $sheet |
||
163 | * @param int $index |
||
164 | * @param Project\Issue $issue |
||
165 | * |
||
166 | * @return void |
||
167 | */ |
||
168 | protected function sheetRow(LaravelExcelWorksheet $sheet, $index, Project\Issue $issue) |
||
188 | } |
||
189 |
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: