Skip to content

Commit f462744

Browse files
committed
Fixing already existing exception detection
1 parent fe4da23 commit f462744

File tree

3 files changed

+2
-13
lines changed

3 files changed

+2
-13
lines changed

generated/Exceptions/CurlException.php

Lines changed: 0 additions & 6 deletions
This file was deleted.

generated/Exceptions/JsonException.php

Lines changed: 0 additions & 6 deletions
This file was deleted.

generator/src/FileCreator.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
use function array_merge;
66
use Complex\Exception;
7+
use function file_exists;
78
use PhpOffice\PhpSpreadsheet\Spreadsheet;
89
use PhpOffice\PhpSpreadsheet\Writer\Xlsx;
910
use function ucfirst;
@@ -145,7 +146,7 @@ public function generateRectorFile(array $functions, string $path): void
145146
public function createExceptionFile(string $moduleName): void
146147
{
147148
$exceptionName = self::toExceptionName($moduleName);
148-
if (!\class_exists("Safe\\Exceptions\\{$exceptionName}")) {
149+
if (!file_exists(__DIR__.'/../../lib/Exceptions/'.$exceptionName.'.php')) {
149150
\file_put_contents(
150151
__DIR__.'/../../generated/Exceptions/'.$exceptionName.'.php',
151152
<<<EOF

0 commit comments

Comments
 (0)