This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| // src/Command/ExportSwaggerCommand.php | |
| namespace App\Command; | |
| use Nelmio\ApiDocBundle\ApiDocGenerator; | |
| use Symfony\Component\Console\Command\Command; | |
| use Symfony\Component\Console\Input\{InputArgument, InputInterface}; | |
| use Symfony\Component\Console\Output\OutputInterface; | |
| use Symfony\Component\Console\Style\SymfonyStyle; | |
| use Symfony\Component\Yaml\Yaml; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| function csv_to_array(string $file, ?string $key_line = null, string $delimiter = ',', string $enclosure = ''): array | |
| { | |
| if (!is_readable($file)) { | |
| throw new \InvalidArgumentException("The file {$file} doesn't exists or not readable."); | |
| } | |
| $titles = $content = []; |
NewerOlder