@@ -18,7 +18,7 @@ discard block |
||
18 | 18 | |
19 | 19 | public function getDefaultNamespace() : string |
20 | 20 | { |
21 | - return $this->laravel['modules']->config('paths.generator.test.path', 'Tests'); |
|
21 | + return $this->laravel[ 'modules' ]->config('paths.generator.test.path', 'Tests'); |
|
22 | 22 | } |
23 | 23 | |
24 | 24 | /** |
@@ -29,8 +29,8 @@ discard block |
||
29 | 29 | protected function getArguments() |
30 | 30 | { |
31 | 31 | return [ |
32 | - ['name', InputArgument::REQUIRED, 'The name of the form request class.'], |
|
33 | - ['module', InputArgument::OPTIONAL, 'The name of module will be used.'], |
|
32 | + [ 'name', InputArgument::REQUIRED, 'The name of the form request class.' ], |
|
33 | + [ 'module', InputArgument::OPTIONAL, 'The name of module will be used.' ], |
|
34 | 34 | ]; |
35 | 35 | } |
36 | 36 | |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | */ |
40 | 40 | protected function getTemplateContents() |
41 | 41 | { |
42 | - $module = $this->laravel['modules']->findOrFail($this->getModuleName()); |
|
42 | + $module = $this->laravel[ 'modules' ]->findOrFail($this->getModuleName()); |
|
43 | 43 | |
44 | 44 | return (new Stub('/unit-test.stub', [ |
45 | 45 | 'NAMESPACE' => $this->getClassNamespace($module), |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | */ |
53 | 53 | protected function getDestinationFilePath() |
54 | 54 | { |
55 | - $path = $this->laravel['modules']->getModulePath($this->getModuleName()); |
|
55 | + $path = $this->laravel[ 'modules' ]->getModulePath($this->getModuleName()); |
|
56 | 56 | |
57 | 57 | $testPath = GenerateConfigReader::read('test'); |
58 | 58 |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | |
30 | 30 | public function getDefaultNamespace() : string |
31 | 31 | { |
32 | - return $this->laravel['modules']->config('paths.generator.notifications.path', 'Notifications'); |
|
32 | + return $this->laravel[ 'modules' ]->config('paths.generator.notifications.path', 'Notifications'); |
|
33 | 33 | } |
34 | 34 | |
35 | 35 | /** |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | */ |
40 | 40 | protected function getTemplateContents() |
41 | 41 | { |
42 | - $module = $this->laravel['modules']->findOrFail($this->getModuleName()); |
|
42 | + $module = $this->laravel[ 'modules' ]->findOrFail($this->getModuleName()); |
|
43 | 43 | |
44 | 44 | return (new Stub('/notification.stub', [ |
45 | 45 | 'NAMESPACE' => $this->getClassNamespace($module), |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | */ |
55 | 55 | protected function getDestinationFilePath() |
56 | 56 | { |
57 | - $path = $this->laravel['modules']->getModulePath($this->getModuleName()); |
|
57 | + $path = $this->laravel[ 'modules' ]->getModulePath($this->getModuleName()); |
|
58 | 58 | |
59 | 59 | $notificationPath = GenerateConfigReader::read('notifications'); |
60 | 60 | |
@@ -77,8 +77,8 @@ discard block |
||
77 | 77 | protected function getArguments() |
78 | 78 | { |
79 | 79 | return [ |
80 | - ['name', InputArgument::REQUIRED, 'The name of the notification class.'], |
|
81 | - ['module', InputArgument::OPTIONAL, 'The name of module will be used.'], |
|
80 | + [ 'name', InputArgument::REQUIRED, 'The name of the notification class.' ], |
|
81 | + [ 'module', InputArgument::OPTIONAL, 'The name of module will be used.' ], |
|
82 | 82 | ]; |
83 | 83 | } |
84 | 84 | } |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | |
36 | 36 | public function getDefaultNamespace() : string |
37 | 37 | { |
38 | - return $this->laravel['modules']->config('paths.generator.rules.path', 'Rules'); |
|
38 | + return $this->laravel[ 'modules' ]->config('paths.generator.rules.path', 'Rules'); |
|
39 | 39 | } |
40 | 40 | |
41 | 41 | /** |
@@ -46,8 +46,8 @@ discard block |
||
46 | 46 | protected function getArguments() |
47 | 47 | { |
48 | 48 | return [ |
49 | - ['name', InputArgument::REQUIRED, 'The name of the rule class.'], |
|
50 | - ['module', InputArgument::OPTIONAL, 'The name of module will be used.'], |
|
49 | + [ 'name', InputArgument::REQUIRED, 'The name of the rule class.' ], |
|
50 | + [ 'module', InputArgument::OPTIONAL, 'The name of module will be used.' ], |
|
51 | 51 | ]; |
52 | 52 | } |
53 | 53 | |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | */ |
57 | 57 | protected function getTemplateContents() |
58 | 58 | { |
59 | - $module = $this->laravel['modules']->findOrFail($this->getModuleName()); |
|
59 | + $module = $this->laravel[ 'modules' ]->findOrFail($this->getModuleName()); |
|
60 | 60 | |
61 | 61 | return (new Stub('/rule.stub', [ |
62 | 62 | 'NAMESPACE' => $this->getClassNamespace($module), |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | */ |
70 | 70 | protected function getDestinationFilePath() |
71 | 71 | { |
72 | - $path = $this->laravel['modules']->getModulePath($this->getModuleName()); |
|
72 | + $path = $this->laravel[ 'modules' ]->getModulePath($this->getModuleName()); |
|
73 | 73 | |
74 | 74 | $rulePath = GenerateConfigReader::read('rules'); |
75 | 75 |
@@ -71,8 +71,8 @@ discard block |
||
71 | 71 | protected function getArguments() |
72 | 72 | { |
73 | 73 | return [ |
74 | - ['model', InputArgument::REQUIRED, 'The name of model will be created.'], |
|
75 | - ['module', InputArgument::OPTIONAL, 'The name of module will be used.'], |
|
74 | + [ 'model', InputArgument::REQUIRED, 'The name of model will be created.' ], |
|
75 | + [ 'module', InputArgument::OPTIONAL, 'The name of module will be used.' ], |
|
76 | 76 | ]; |
77 | 77 | } |
78 | 78 | |
@@ -84,8 +84,8 @@ discard block |
||
84 | 84 | protected function getOptions() |
85 | 85 | { |
86 | 86 | return [ |
87 | - ['fillable', null, InputOption::VALUE_OPTIONAL, 'The fillable attributes.', null], |
|
88 | - ['migration', 'm', InputOption::VALUE_NONE, 'Flag to create associated migrations', null], |
|
87 | + [ 'fillable', null, InputOption::VALUE_OPTIONAL, 'The fillable attributes.', null ], |
|
88 | + [ 'migration', 'm', InputOption::VALUE_NONE, 'Flag to create associated migrations', null ], |
|
89 | 89 | ]; |
90 | 90 | } |
91 | 91 | |
@@ -96,7 +96,7 @@ discard block |
||
96 | 96 | { |
97 | 97 | if ($this->option('migration') === true) { |
98 | 98 | $migrationName = 'create_'.$this->createMigrationName().'_table'; |
99 | - $this->call('module:make-migration', ['name' => $migrationName, 'module' => $this->argument('module')]); |
|
99 | + $this->call('module:make-migration', [ 'name' => $migrationName, 'module' => $this->argument('module') ]); |
|
100 | 100 | } |
101 | 101 | } |
102 | 102 | |
@@ -105,7 +105,7 @@ discard block |
||
105 | 105 | */ |
106 | 106 | protected function getTemplateContents() |
107 | 107 | { |
108 | - $module = $this->laravel['modules']->findOrFail($this->getModuleName()); |
|
108 | + $module = $this->laravel[ 'modules' ]->findOrFail($this->getModuleName()); |
|
109 | 109 | |
110 | 110 | return (new Stub('/model.stub', [ |
111 | 111 | 'NAME' => $this->getModelName(), |
@@ -115,7 +115,7 @@ discard block |
||
115 | 115 | 'LOWER_NAME' => $module->getLowerName(), |
116 | 116 | 'MODULE' => $this->getModuleName(), |
117 | 117 | 'STUDLY_NAME' => $module->getStudlyName(), |
118 | - 'MODULE_NAMESPACE' => $this->laravel['modules']->config('namespace'), |
|
118 | + 'MODULE_NAMESPACE' => $this->laravel[ 'modules' ]->config('namespace'), |
|
119 | 119 | ]))->render(); |
120 | 120 | } |
121 | 121 | |
@@ -124,7 +124,7 @@ discard block |
||
124 | 124 | */ |
125 | 125 | protected function getDestinationFilePath() |
126 | 126 | { |
127 | - $path = $this->laravel['modules']->getModulePath($this->getModuleName()); |
|
127 | + $path = $this->laravel[ 'modules' ]->getModulePath($this->getModuleName()); |
|
128 | 128 | |
129 | 129 | $modelPath = GenerateConfigReader::read('model'); |
130 | 130 | |
@@ -146,7 +146,7 @@ discard block |
||
146 | 146 | { |
147 | 147 | $fillable = $this->option('fillable'); |
148 | 148 | |
149 | - if (! is_null($fillable)) { |
|
149 | + if (!is_null($fillable)) { |
|
150 | 150 | $arrays = explode(',', $fillable); |
151 | 151 | |
152 | 152 | return json_encode($arrays); |
@@ -162,6 +162,6 @@ discard block |
||
162 | 162 | */ |
163 | 163 | public function getDefaultNamespace() : string |
164 | 164 | { |
165 | - return $this->laravel['modules']->config('paths.generator.model.path', 'Entities'); |
|
165 | + return $this->laravel[ 'modules' ]->config('paths.generator.model.path', 'Entities'); |
|
166 | 166 | } |
167 | 167 | } |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | |
36 | 36 | public function getDefaultNamespace() : string |
37 | 37 | { |
38 | - return $this->laravel['modules']->config('paths.generator.policies.path', 'Policies'); |
|
38 | + return $this->laravel[ 'modules' ]->config('paths.generator.policies.path', 'Policies'); |
|
39 | 39 | } |
40 | 40 | |
41 | 41 | /** |
@@ -46,8 +46,8 @@ discard block |
||
46 | 46 | protected function getArguments() |
47 | 47 | { |
48 | 48 | return [ |
49 | - ['name', InputArgument::REQUIRED, 'The name of the policy class.'], |
|
50 | - ['module', InputArgument::OPTIONAL, 'The name of module will be used.'], |
|
49 | + [ 'name', InputArgument::REQUIRED, 'The name of the policy class.' ], |
|
50 | + [ 'module', InputArgument::OPTIONAL, 'The name of module will be used.' ], |
|
51 | 51 | ]; |
52 | 52 | } |
53 | 53 | |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | */ |
57 | 57 | protected function getTemplateContents() |
58 | 58 | { |
59 | - $module = $this->laravel['modules']->findOrFail($this->getModuleName()); |
|
59 | + $module = $this->laravel[ 'modules' ]->findOrFail($this->getModuleName()); |
|
60 | 60 | |
61 | 61 | return (new Stub('/policy.plain.stub', [ |
62 | 62 | 'NAMESPACE' => $this->getClassNamespace($module), |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | */ |
70 | 70 | protected function getDestinationFilePath() |
71 | 71 | { |
72 | - $path = $this->laravel['modules']->getModulePath($this->getModuleName()); |
|
72 | + $path = $this->laravel[ 'modules' ]->getModulePath($this->getModuleName()); |
|
73 | 73 | |
74 | 74 | $policyPath = GenerateConfigReader::read('policies'); |
75 | 75 |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | |
49 | 49 | protected function getEventName(): string |
50 | 50 | { |
51 | - return once(function () { |
|
51 | + return once(function() { |
|
52 | 52 | $eventName = $this->option('event') ?? $this->ask('What is the name of the event that should be listened on?', false) ?? 'null'; |
53 | 53 | if ($eventName === null) { |
54 | 54 | throw new Exception('Eventname for listener not given'); |
@@ -60,10 +60,10 @@ discard block |
||
60 | 60 | |
61 | 61 | protected function listenerNeedsQueueing(): bool |
62 | 62 | { |
63 | - return once(function () { |
|
63 | + return once(function() { |
|
64 | 64 | $option = $this->option('queued'); |
65 | 65 | |
66 | - return app()->runningInConsole() && ! $option ? $this->confirm('Should the listener be queued?', false) : $option; |
|
66 | + return app()->runningInConsole() && !$option ? $this->confirm('Should the listener be queued?', false) : $option; |
|
67 | 67 | }); |
68 | 68 | } |
69 | 69 | |
@@ -92,8 +92,8 @@ discard block |
||
92 | 92 | protected function getOptions() |
93 | 93 | { |
94 | 94 | return [ |
95 | - ['event', 'e', InputOption::VALUE_OPTIONAL, 'The event class being listened for.'], |
|
96 | - ['queued', null, InputOption::VALUE_NONE, 'Indicates the event listener should be queued.'], |
|
95 | + [ 'event', 'e', InputOption::VALUE_OPTIONAL, 'The event class being listened for.' ], |
|
96 | + [ 'queued', null, InputOption::VALUE_NONE, 'Indicates the event listener should be queued.' ], |
|
97 | 97 | ]; |
98 | 98 | } |
99 | 99 | } |
@@ -37,8 +37,8 @@ discard block |
||
37 | 37 | protected function getArguments() |
38 | 38 | { |
39 | 39 | return [ |
40 | - ['name', InputArgument::REQUIRED, 'The migration name will be created.'], |
|
41 | - ['module', InputArgument::OPTIONAL, 'The name of module will be created.'], |
|
40 | + [ 'name', InputArgument::REQUIRED, 'The migration name will be created.' ], |
|
41 | + [ 'module', InputArgument::OPTIONAL, 'The name of module will be created.' ], |
|
42 | 42 | ]; |
43 | 43 | } |
44 | 44 | |
@@ -50,8 +50,8 @@ discard block |
||
50 | 50 | protected function getOptions() |
51 | 51 | { |
52 | 52 | return [ |
53 | - ['fields', null, InputOption::VALUE_OPTIONAL, 'The specified fields table.', null], |
|
54 | - ['plain', null, InputOption::VALUE_NONE, 'Create plain migration.'], |
|
53 | + [ 'fields', null, InputOption::VALUE_OPTIONAL, 'The specified fields table.', null ], |
|
54 | + [ 'plain', null, InputOption::VALUE_NONE, 'Create plain migration.' ], |
|
55 | 55 | ]; |
56 | 56 | } |
57 | 57 | |
@@ -112,7 +112,7 @@ discard block |
||
112 | 112 | */ |
113 | 113 | protected function getDestinationFilePath() |
114 | 114 | { |
115 | - $path = $this->laravel['modules']->getModulePath($this->getModuleName()); |
|
115 | + $path = $this->laravel[ 'modules' ]->getModulePath($this->getModuleName()); |
|
116 | 116 | |
117 | 117 | $generatorPath = GenerateConfigReader::read('migration'); |
118 | 118 |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | |
30 | 30 | public function getDefaultNamespace() : string |
31 | 31 | { |
32 | - return $this->laravel['modules']->config('paths.generator.emails.path', 'Emails'); |
|
32 | + return $this->laravel[ 'modules' ]->config('paths.generator.emails.path', 'Emails'); |
|
33 | 33 | } |
34 | 34 | |
35 | 35 | /** |
@@ -40,8 +40,8 @@ discard block |
||
40 | 40 | protected function getArguments() |
41 | 41 | { |
42 | 42 | return [ |
43 | - ['name', InputArgument::REQUIRED, 'The name of the mailable.'], |
|
44 | - ['module', InputArgument::OPTIONAL, 'The name of module will be used.'], |
|
43 | + [ 'name', InputArgument::REQUIRED, 'The name of the mailable.' ], |
|
44 | + [ 'module', InputArgument::OPTIONAL, 'The name of module will be used.' ], |
|
45 | 45 | ]; |
46 | 46 | } |
47 | 47 | |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | */ |
53 | 53 | protected function getTemplateContents() |
54 | 54 | { |
55 | - $module = $this->laravel['modules']->findOrFail($this->getModuleName()); |
|
55 | + $module = $this->laravel[ 'modules' ]->findOrFail($this->getModuleName()); |
|
56 | 56 | |
57 | 57 | return (new Stub('/mail.stub', [ |
58 | 58 | 'NAMESPACE' => $this->getClassNamespace($module), |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | */ |
68 | 68 | protected function getDestinationFilePath() |
69 | 69 | { |
70 | - $path = $this->laravel['modules']->getModulePath($this->getModuleName()); |
|
70 | + $path = $this->laravel[ 'modules' ]->getModulePath($this->getModuleName()); |
|
71 | 71 | |
72 | 72 | $mailPath = GenerateConfigReader::read('emails'); |
73 | 73 |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | |
36 | 36 | public function getDefaultNamespace() : string |
37 | 37 | { |
38 | - return $this->laravel['modules']->config('paths.generator.request.path', 'Http/Requests'); |
|
38 | + return $this->laravel[ 'modules' ]->config('paths.generator.request.path', 'Http/Requests'); |
|
39 | 39 | } |
40 | 40 | |
41 | 41 | /** |
@@ -46,8 +46,8 @@ discard block |
||
46 | 46 | protected function getArguments() |
47 | 47 | { |
48 | 48 | return [ |
49 | - ['name', InputArgument::REQUIRED, 'The name of the form request class.'], |
|
50 | - ['module', InputArgument::OPTIONAL, 'The name of module will be used.'], |
|
49 | + [ 'name', InputArgument::REQUIRED, 'The name of the form request class.' ], |
|
50 | + [ 'module', InputArgument::OPTIONAL, 'The name of module will be used.' ], |
|
51 | 51 | ]; |
52 | 52 | } |
53 | 53 | |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | */ |
57 | 57 | protected function getTemplateContents() |
58 | 58 | { |
59 | - $module = $this->laravel['modules']->findOrFail($this->getModuleName()); |
|
59 | + $module = $this->laravel[ 'modules' ]->findOrFail($this->getModuleName()); |
|
60 | 60 | |
61 | 61 | return (new Stub('/request.stub', [ |
62 | 62 | 'NAMESPACE' => $this->getClassNamespace($module), |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | */ |
70 | 70 | protected function getDestinationFilePath() |
71 | 71 | { |
72 | - $path = $this->laravel['modules']->getModulePath($this->getModuleName()); |
|
72 | + $path = $this->laravel[ 'modules' ]->getModulePath($this->getModuleName()); |
|
73 | 73 | |
74 | 74 | $requestPath = GenerateConfigReader::read('request'); |
75 | 75 |