Total Complexity | 2 |
Total Lines | 30 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
11 | class Issue4112Test extends AbstractFunctional |
||
12 | { |
||
13 | /** |
||
14 | * Problem deleting all sheets then adding one. |
||
15 | * |
||
16 | * @dataProvider providerSheetNumber |
||
17 | */ |
||
18 | public function testIssue4112(?int $sheetNumber): void |
||
|
|||
19 | { |
||
20 | $mySpreadsheet = new Spreadsheet(); |
||
21 | $mySpreadsheet->removeSheetByIndex(0); |
||
22 | $worksheet = new Worksheet($mySpreadsheet, 'addedsheet'); |
||
23 | self::assertSame(-1, $mySpreadsheet->getActiveSheetIndex()); |
||
24 | $mySpreadsheet->addSheet($worksheet, 0); |
||
25 | self::assertSame('addedsheet', $mySpreadsheet->getActiveSheet()->getTitle()); |
||
26 | $row = 1; |
||
27 | $col = 1; |
||
28 | $worksheet->getCell([$col, $row])->setValue('id_uti'); |
||
29 | self::assertSame('id_uti', $worksheet->getCell([$col, $row])->getValue()); |
||
30 | $mySpreadsheet->disconnectWorksheets(); |
||
31 | } |
||
32 | |||
33 | public static function providerSheetNumber(): array |
||
41 | ]; |
||
42 | } |
||
44 |
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.