Skip to content

Commit

Permalink
Fixing already existing exception detection
Browse files Browse the repository at this point in the history
  • Loading branch information
moufmouf committed Sep 18, 2018
1 parent fe4da23 commit f462744
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 13 deletions.
6 changes: 0 additions & 6 deletions generated/Exceptions/CurlException.php

This file was deleted.

6 changes: 0 additions & 6 deletions generated/Exceptions/JsonException.php

This file was deleted.

3 changes: 2 additions & 1 deletion generator/src/FileCreator.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

use function array_merge;
use Complex\Exception;
use function file_exists;
use PhpOffice\PhpSpreadsheet\Spreadsheet;
use PhpOffice\PhpSpreadsheet\Writer\Xlsx;
use function ucfirst;
Expand Down Expand Up @@ -145,7 +146,7 @@ public function generateRectorFile(array $functions, string $path): void
public function createExceptionFile(string $moduleName): void
{
$exceptionName = self::toExceptionName($moduleName);
if (!\class_exists("Safe\\Exceptions\\{$exceptionName}")) {
if (!file_exists(__DIR__.'/../../lib/Exceptions/'.$exceptionName.'.php')) {
\file_put_contents(
__DIR__.'/../../generated/Exceptions/'.$exceptionName.'.php',
<<<EOF
Expand Down

0 comments on commit f462744

Please sign in to comment.