Skip to content

Commit 898f1d5

Browse files
refactor(Commands): improvement code style
1 parent f5a3d08 commit 898f1d5

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

src/Commands/MakeAll.php

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
use Illuminate\Console\Command;
66
use Eghamat24\DatabaseRepository\CustomMySqlQueries;
7-
use phpDocumentor\Reflection\PseudoTypes\NonEmptyLowercaseString;
87

98
class MakeAll extends Command
109
{
@@ -37,9 +36,15 @@ class MakeAll extends Command
3736
*/
3837
public function handle()
3938
{
40-
$strategyNames = array("ClearableTemporaryCacheStrategy", "QueryCacheStrategy", "SingleKeyCacheStrategy", "TemporaryCacheStrategy");
41-
if (!in_array($this->option('strategy_name'), $strategyNames)) {
42-
$this->alert("This pattern strategy does not exist !!! ");
39+
$strategyNames = [
40+
'ClearableTemporaryCacheStrategy',
41+
'QueryCacheStrategy',
42+
'SingleKeyCacheStrategy',
43+
'TemporaryCacheStrategy'
44+
];
45+
46+
if (in_array($this->option('strategy_name'), $strategyNames) === false) {
47+
$this->alert('This pattern strategy does not exist !!! ');
4348
exit;
4449
}
4550

@@ -49,6 +54,7 @@ public function handle()
4954
$detectForeignKeys = $this->option('foreign-keys');
5055
$addToGit = $this->option('add-to-git');
5156
$strategy = $this->option('strategy_name');
57+
5258
if ($this->option('all-tables')) {
5359
$tableNames = $this->getAllTableNames()->pluck('TABLE_NAME');
5460
} else if ($this->option('table_names')) {
@@ -59,6 +65,7 @@ public function handle()
5965
}
6066

6167
foreach ($tableNames as $_tableName) {
68+
6269
$arguments = [
6370
'table_name' => $_tableName,
6471
'--foreign-keys' => $detectForeignKeys,

0 commit comments

Comments
 (0)