File tree Expand file tree Collapse file tree 2 files changed +30
-0
lines changed
src/Illuminate/Foundation/Console Expand file tree Collapse file tree 2 files changed +30
-0
lines changed Original file line number Diff line number Diff line change @@ -40,6 +40,21 @@ protected function getStub()
40
40
return __DIR__ .'/stubs/interface.stub ' ;
41
41
}
42
42
43
+ /**
44
+ * Get the default namespace for the class.
45
+ *
46
+ * @param string $rootNamespace
47
+ * @return string
48
+ */
49
+ protected function getDefaultNamespace ($ rootNamespace )
50
+ {
51
+ return match (true ) {
52
+ is_dir (app_path ('Contracts ' )) => $ rootNamespace .'\\Contracts ' ,
53
+ is_dir (app_path ('Interfaces ' )) => $ rootNamespace .'\\Interfaces ' ,
54
+ default => $ rootNamespace ,
55
+ };
56
+ }
57
+
43
58
/**
44
59
* Get the console command arguments.
45
60
*
Original file line number Diff line number Diff line change @@ -53,6 +53,21 @@ protected function resolveStubPath($stub)
53
53
: __DIR__ .$ stub ;
54
54
}
55
55
56
+ /**
57
+ * Get the default namespace for the class.
58
+ *
59
+ * @param string $rootNamespace
60
+ * @return string
61
+ */
62
+ protected function getDefaultNamespace ($ rootNamespace )
63
+ {
64
+ return match (true ) {
65
+ is_dir (app_path ('Concerns ' )) => $ rootNamespace .'\\Concerns ' ,
66
+ is_dir (app_path ('Traits ' )) => $ rootNamespace .'\\Traits ' ,
67
+ default => $ rootNamespace ,
68
+ };
69
+ }
70
+
56
71
/**
57
72
* Get the console command arguments.
58
73
*
You can’t perform that action at this time.
0 commit comments