Skip to content

Commit efd6526

Browse files
committed
remove useless function
1 parent ba4113d commit efd6526

File tree

1 file changed

+0
-34
lines changed

1 file changed

+0
-34
lines changed

generator/src/FileCreator.php

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -3,44 +3,10 @@
33
namespace Safe;
44

55
use function array_merge;
6-
use Complex\Exception;
76
use function file_exists;
8-
use PhpOffice\PhpSpreadsheet\Spreadsheet;
9-
use PhpOffice\PhpSpreadsheet\Writer\Xlsx;
107

118
class FileCreator
129
{
13-
/**
14-
* This function generate an xls file
15-
*
16-
* @param string[] $protoFunctions
17-
* @param string $path
18-
*/
19-
public function generateXlsFile(array $protoFunctions, string $path): void
20-
{
21-
$spreadsheet = new Spreadsheet();
22-
$numb = 1;
23-
24-
$sheet = $spreadsheet->getActiveSheet();
25-
$sheet->setCellValue('A1', 'Function name');
26-
$sheet->setCellValue('B1', 'Status');
27-
28-
foreach ($protoFunctions as $protoFunction) {
29-
if ($protoFunction) {
30-
if (strpos($protoFunction, '=') === false && strpos($protoFunction, 'json') === false) {
31-
$status = 'classic';
32-
} elseif (strpos($protoFunction, 'json')) {
33-
$status = 'json';
34-
} else {
35-
$status = 'opt';
36-
}
37-
$sheet->setCellValue('A'.$numb, $protoFunction);
38-
$sheet->setCellValue('B'.$numb++, $status);
39-
}
40-
}
41-
$writer = new Xlsx($spreadsheet);
42-
$writer->save($path);
43-
}
4410

4511
/**
4612
* This function generate an improved php lib function in a php file

0 commit comments

Comments
 (0)