@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | |
31 | 31 | $this->components->info('Enabling domain ...'); |
32 | 32 | |
33 | - if ($name = $this->argument('domain') ) { |
|
33 | + if ($name = $this->argument('domain')) { |
|
34 | 34 | $this->enable($name); |
35 | 35 | |
36 | 36 | return 0; |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | { |
67 | 67 | if ($name instanceof Domain) { |
68 | 68 | $domain = $name; |
69 | - }else { |
|
69 | + } else { |
|
70 | 70 | $domain = $this->laravel['domains']->findOrFail($name); |
71 | 71 | } |
72 | 72 | |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | $domain->enable(); |
75 | 75 | |
76 | 76 | $this->components->info("Domain [{$domain}] enabled successful."); |
77 | - }else { |
|
77 | + } else { |
|
78 | 78 | $this->components->warn("Domain [{$domain}] has already enabled."); |
79 | 79 | } |
80 | 80 |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | { |
67 | 67 | if ($name instanceof Domain) { |
68 | 68 | $domain = $name; |
69 | - }else { |
|
69 | + } else { |
|
70 | 70 | $domain = $this->laravel['domains']->findOrFail($name); |
71 | 71 | } |
72 | 72 | |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | $domain->enable(); |
75 | 75 | |
76 | 76 | $this->components->info("Domain [{$domain}] enabled successful."); |
77 | - }else { |
|
77 | + } else { |
|
78 | 78 | $this->components->warn("Domain [{$domain}] has already enabled."); |
79 | 79 | } |
80 | 80 |
@@ -104,7 +104,7 @@ |
||
104 | 104 | $name = $domain->getName(); |
105 | 105 | $config = $domain->get('migration'); |
106 | 106 | if (is_array($config) && array_key_exists('seeds', $config)) { |
107 | - foreach ((array)$config['seeds'] as $class) { |
|
107 | + foreach ((array) $config['seeds'] as $class) { |
|
108 | 108 | if (class_exists($class)) { |
109 | 109 | $seeders[] = $class; |
110 | 110 | } |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | * @see fire() |
42 | 42 | * @return void |
43 | 43 | */ |
44 | - public function handle(){ |
|
44 | + public function handle() { |
|
45 | 45 | $this->laravel->call([$this, 'fire'], func_get_args()); |
46 | 46 | } |
47 | 47 | |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | ]; |
89 | 89 | |
90 | 90 | // Generate a controller resource |
91 | - $controller_command = ((float) app()->version() >= 5.5 ? 'make:rest-controller' : 'make:resource'); |
|
91 | + $controller_command = ((float) app()->version() >= 5.5 ? 'make:rest-controller' : 'make:resource'); |
|
92 | 92 | $this->call($controller_command, $resource_args); |
93 | 93 | } |
94 | 94 |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | * @see fire() |
58 | 58 | * @return void |
59 | 59 | */ |
60 | - public function handle(){ |
|
60 | + public function handle() { |
|
61 | 61 | $this->laravel->call([$this, 'fire'], func_get_args()); |
62 | 62 | } |
63 | 63 | |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | public function fire() |
70 | 70 | { |
71 | 71 | $this->generators = new Collection(); |
72 | - if($this->argument('domain') && $this->argument('domain-path')) { |
|
72 | + if ($this->argument('domain') && $this->argument('domain-path')) { |
|
73 | 73 | $domain = $this->argument('domain'); |
74 | 74 | $domainPath = $this->argument('domain-path'); |
75 | 75 | } else { |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | 'name' => 'create_' . Str::snake(Str::plural($this->argument('name'))) . '_table', |
82 | 82 | 'fields' => $this->option('fillable'), |
83 | 83 | 'force' => $this->option('force'), |
84 | - ],$domain,$domainPath); |
|
84 | + ], $domain, $domainPath); |
|
85 | 85 | |
86 | 86 | if (!$this->option('skip-migration')) { |
87 | 87 | $this->generators->push($migrationGenerator); |
@@ -91,12 +91,12 @@ discard block |
||
91 | 91 | 'name' => $this->argument('name'), |
92 | 92 | 'fillable' => $this->option('fillable'), |
93 | 93 | 'force' => $this->option('force') |
94 | - ],$domain,$domainPath); |
|
94 | + ], $domain, $domainPath); |
|
95 | 95 | |
96 | 96 | $modelRelationsGenerator = new ModelRelationsGenerator([ |
97 | 97 | 'name' => $this->argument('name'), |
98 | 98 | 'force' => $this->option('force'), |
99 | - ],$domain,$domainPath); |
|
99 | + ], $domain, $domainPath); |
|
100 | 100 | |
101 | 101 | if (!$this->option('skip-model')) { |
102 | 102 | $this->generators->push($modelGenerator); |
@@ -106,7 +106,7 @@ discard block |
||
106 | 106 | $this->generators->push(new RepositoryInterfaceGenerator([ |
107 | 107 | 'name' => $this->argument('name'), |
108 | 108 | 'force' => $this->option('force'), |
109 | - ],$domain,$domainPath)); |
|
109 | + ], $domain, $domainPath)); |
|
110 | 110 | |
111 | 111 | foreach ($this->generators as $generator) { |
112 | 112 | $generator->run(); |
@@ -125,7 +125,7 @@ discard block |
||
125 | 125 | 'validator' => $this->option('validator'), |
126 | 126 | 'force' => $this->option('force'), |
127 | 127 | 'model' => $model |
128 | - ],$domain,$domainPath))->run(); |
|
128 | + ], $domain, $domainPath))->run(); |
|
129 | 129 | $this->info("Repository created successfully."); |
130 | 130 | } catch (FileAlreadyExistsException $e) { |
131 | 131 | $this->error($this->type . ' already exists!'); |
@@ -40,7 +40,7 @@ |
||
40 | 40 | |
41 | 41 | public function getDestinationFilePath() |
42 | 42 | { |
43 | - $path = $this->laravel['domains']->getDomainPath($this->getDomainName()); |
|
43 | + $path = $this->laravel['domains']->getDomainPath($this->getDomainName()); |
|
44 | 44 | |
45 | 45 | $eventPath = GenerateConfigReader::read('event'); |
46 | 46 |
@@ -28,7 +28,7 @@ |
||
28 | 28 | public function handle(): int |
29 | 29 | { |
30 | 30 | $this->components->twoColumnDetail('<fg=gray>Status / Name</>', '<fg=gray>Path / priority</>'); |
31 | - collect($this->getRows())->each(function ($row) { |
|
31 | + collect($this->getRows())->each(function($row) { |
|
32 | 32 | |
33 | 33 | $this->components->twoColumnDetail("[{$row[1]}] {$row[0]}", "{$row[3]} [{$row[2]}]"); |
34 | 34 | }); |
@@ -43,7 +43,7 @@ |
||
43 | 43 | $contents = $this->getTemplateContents(); |
44 | 44 | |
45 | 45 | try { |
46 | - $this->components->task("Generating file {$path}",function () use ($path,$contents) { |
|
46 | + $this->components->task("Generating file {$path}", function() use ($path, $contents) { |
|
47 | 47 | $overwriteFile = $this->hasOption('force') ? $this->option('force') : false; |
48 | 48 | (new FileGenerator($path, $contents))->withFileOverwrite($overwriteFile)->generate(); |
49 | 49 | }); |
@@ -60,7 +60,7 @@ |
||
60 | 60 | |
61 | 61 | $string = ''; |
62 | 62 | foreach ($pieces as $i => $piece) { |
63 | - if ($i+1 < count($pieces)) { |
|
63 | + if ($i + 1 < count($pieces)) { |
|
64 | 64 | $string .= strtolower($piece) . '_'; |
65 | 65 | } else { |
66 | 66 | $string .= Str::plural(strtolower($piece)); |
@@ -77,10 +77,10 @@ |
||
77 | 77 | } |
78 | 78 | |
79 | 79 | /** |
80 | - * Get domain type . |
|
81 | - * |
|
82 | - * @return string |
|
83 | - */ |
|
80 | + * Get domain type . |
|
81 | + * |
|
82 | + * @return string |
|
83 | + */ |
|
84 | 84 | private function getDomainType() |
85 | 85 | { |
86 | 86 | $isPlain = $this->option('plain'); |