Skip to content

Commit d98318f

Browse files
committed
Use "return 0" Instead of "die" When Classes Already Exists
1 parent 743fe25 commit d98318f

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

src/Commands/MakeFactory.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ public function handle(): int
6363

6464
if (class_exists("$relativeFactoriesPath\\$factoryName") && !$this->option('force')) {
6565
$this->alert("Factory $factoryName is already exist!");
66-
die;
66+
return 0;
6767
}
6868

6969
$columns = $this->getAllColumnsInTable($tableName);

src/Commands/MakeInterfaceRepository.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ public function handle(): int
7272

7373
if (class_exists("$relativeInterfacePath\\$interfaceName") && !$this->option('force')) {
7474
$this->alert("Interface $interfaceName is already exist!");
75-
die;
75+
return 0;
7676
}
7777

7878
$columns = $this->getAllColumnsInTable($tableName);

src/Commands/MakeMySqlRepository.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ public function handle(): int
8282

8383
if (class_exists("$relativeMysqlRepositoryPath\\$mysqlRepositoryName") && !$this->option('force')) {
8484
$this->alert("Repository $mysqlRepositoryName is already exist!");
85-
die;
85+
return 0;
8686
}
8787

8888
$columns = $this->getAllColumnsInTable($tableName);

src/Commands/MakeRedisRepository.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public function handle(): int
5757

5858
if (class_exists("$relativeRedisRepositoryPath\\$redisRepositoryName") && !$this->option('force')) {
5959
$this->alert("Repository $redisRepositoryName is already exist!");
60-
die;
60+
return 0;
6161
}
6262

6363
$columns = $this->getAllColumnsInTable($tableName);

src/Commands/MakeResource.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ public function handle(): int
7272

7373
if (class_exists("$relativeResourcesPath\\$resourceName") && !$this->option('force')) {
7474
$this->alert("Resource $resourceName is already exist!");
75-
die;
75+
return 0;
7676
}
7777

7878
$columns = $this->getAllColumnsInTable($tableName);

0 commit comments

Comments
 (0)