4
4
5
5
use Illuminate \Console \Command ;
6
6
use Eghamat24 \DatabaseRepository \CustomMySqlQueries ;
7
- use phpDocumentor \Reflection \PseudoTypes \NonEmptyLowercaseString ;
8
7
9
8
class MakeAll extends Command
10
9
{
@@ -37,9 +36,15 @@ class MakeAll extends Command
37
36
*/
38
37
public function handle ()
39
38
{
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 !!! ' );
43
48
exit ;
44
49
}
45
50
@@ -49,6 +54,7 @@ public function handle()
49
54
$ detectForeignKeys = $ this ->option ('foreign-keys ' );
50
55
$ addToGit = $ this ->option ('add-to-git ' );
51
56
$ strategy = $ this ->option ('strategy_name ' );
57
+
52
58
if ($ this ->option ('all-tables ' )) {
53
59
$ tableNames = $ this ->getAllTableNames ()->pluck ('TABLE_NAME ' );
54
60
} else if ($ this ->option ('table_names ' )) {
@@ -59,6 +65,7 @@ public function handle()
59
65
}
60
66
61
67
foreach ($ tableNames as $ _tableName ) {
68
+
62
69
$ arguments = [
63
70
'table_name ' => $ _tableName ,
64
71
'--foreign-keys ' => $ detectForeignKeys ,
0 commit comments