44
55use Illuminate \Console \Command ;
66use Eghamat24 \DatabaseRepository \CustomMySqlQueries ;
7- use phpDocumentor \Reflection \PseudoTypes \NonEmptyLowercaseString ;
87
98class 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