Skip to content

Commit 9a82b60

Browse files
committed
Minor Refactor
1 parent fa8094c commit 9a82b60

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/Commands/MakeMySqlRepository.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,9 @@ public function handle(): int
9292
return 0;
9393
}
9494

95-
if (!file_exists($relativeMysqlRepositoryPath)) {
96-
mkdir($relativeMysqlRepositoryPath);
95+
if ( ! file_exists($relativeMysqlRepositoryPath) && ! mkdir($relativeMysqlRepositoryPath) && ! is_dir($relativeMysqlRepositoryPath)) {
96+
$this->alert("Directory \"$relativeMysqlRepositoryPath\" was not created");
97+
return 0;
9798
}
9899

99100
if (class_exists("$relativeMysqlRepositoryPath\\$mysqlRepositoryName") && !$this->option('force')) {

0 commit comments

Comments
 (0)