Skip to content

Commit 204f4b6

Browse files
authored
Merge pull request #77 from gazsp/analysis-OMbRbW
Apply fixes from StyleCI
2 parents 0905639 + ab3da85 commit 204f4b6

File tree

2 files changed

+27
-28
lines changed

2 files changed

+27
-28
lines changed

src/Baum/Console/ModelMakeCommand.php

+22-22
Original file line numberDiff line numberDiff line change
@@ -48,19 +48,19 @@ public function handle()
4848
// $this->input->setOption('controller', true);
4949
// $this->input->setOption('resource', true);
5050
// }
51-
//
51+
//
5252
// if ($this->option('factory')) {
5353
// $this->createFactory();
5454
// }
55-
//
55+
//
5656
// if ($this->option('migration')) {
5757
// $this->createMigration();
5858
// }
59-
//
59+
//
6060
// if ($this->option('seed')) {
6161
// $this->createSeeder();
6262
// }
63-
//
63+
//
6464
// if ($this->option('controller') || $this->option('resource') || $this->option('api')) {
6565
// $this->createController();
6666
// }
@@ -74,7 +74,7 @@ public function handle()
7474
// protected function createFactory()
7575
// {
7676
// $factory = Str::studly(class_basename($this->argument('name')));
77-
//
77+
//
7878
// $this->call('make:factory', [
7979
// 'name' => "{$factory}Factory",
8080
// '--model' => $this->qualifyClass($this->getNameInput()),
@@ -89,11 +89,11 @@ public function handle()
8989
// protected function createMigration()
9090
// {
9191
// $table = Str::snake(Str::pluralStudly(class_basename($this->argument('name'))));
92-
//
93-
// // if ($this->option('pivot')) {
94-
// // $table = Str::singular($table);
95-
// // }
96-
//
92+
//
93+
// // if ($this->option('pivot')) {
94+
// // $table = Str::singular($table);
95+
// // }
96+
//
9797
// $this->call('make:migration', [
9898
// 'name' => "create_{$table}_table",
9999
// '--create' => $table,
@@ -108,7 +108,7 @@ public function handle()
108108
// protected function createSeeder()
109109
// {
110110
// $seeder = Str::studly(class_basename($this->argument('name')));
111-
//
111+
//
112112
// $this->call('make:seed', [
113113
// 'name' => "{$seeder}Seeder",
114114
// ]);
@@ -122,9 +122,9 @@ public function handle()
122122
// protected function createController()
123123
// {
124124
// $controller = Str::studly(class_basename($this->argument('name')));
125-
//
125+
//
126126
// $modelName = $this->qualifyClass($this->getNameInput());
127-
//
127+
//
128128
// $this->call('make:controller', array_filter([
129129
// 'name' => "{$controller}Controller",
130130
// '--model' => $this->option('resource') || $this->option('api') ? $modelName : null,
@@ -156,7 +156,7 @@ protected function resolveStubPath($stub)
156156
// return file_exists($customPath = $this->laravel->basePath(trim($stub, '/')))
157157
// ? $customPath
158158
// : __DIR__.$stub;
159-
return __DIR__ . $stub;
159+
return __DIR__.$stub;
160160
}
161161

162162
/**
@@ -167,15 +167,15 @@ protected function resolveStubPath($stub)
167167
protected function getOptions()
168168
{
169169
return [
170-
// ['all', 'a', InputOption::VALUE_NONE, 'Generate a migration, seeder, factory, and resource controller for the model'],
171-
// ['controller', 'c', InputOption::VALUE_NONE, 'Create a new controller for the model'],
172-
// ['factory', 'f', InputOption::VALUE_NONE, 'Create a new factory for the model'],
170+
// ['all', 'a', InputOption::VALUE_NONE, 'Generate a migration, seeder, factory, and resource controller for the model'],
171+
// ['controller', 'c', InputOption::VALUE_NONE, 'Create a new controller for the model'],
172+
// ['factory', 'f', InputOption::VALUE_NONE, 'Create a new factory for the model'],
173173
['force', null, InputOption::VALUE_NONE, 'Create the class even if the model already exists'],
174-
// ['migration', 'm', InputOption::VALUE_NONE, 'Create a new migration file for the model'],
175-
// ['seed', 's', InputOption::VALUE_NONE, 'Create a new seeder file for the model'],
176-
// ['pivot', 'p', InputOption::VALUE_NONE, 'Indicates if the generated model should be a custom intermediate table model'],
177-
// ['resource', 'r', InputOption::VALUE_NONE, 'Indicates if the generated controller should be a resource controller'],
178-
// ['api', null, InputOption::VALUE_NONE, 'Indicates if the generated controller should be an API controller'],
174+
// ['migration', 'm', InputOption::VALUE_NONE, 'Create a new migration file for the model'],
175+
// ['seed', 's', InputOption::VALUE_NONE, 'Create a new seeder file for the model'],
176+
// ['pivot', 'p', InputOption::VALUE_NONE, 'Indicates if the generated model should be a custom intermediate table model'],
177+
// ['resource', 'r', InputOption::VALUE_NONE, 'Indicates if the generated controller should be a resource controller'],
178+
// ['api', null, InputOption::VALUE_NONE, 'Indicates if the generated controller should be an API controller'],
179179
];
180180
}
181181
}

tests/Basic/BasicBaumTest.php

+5-6
Original file line numberDiff line numberDiff line change
@@ -248,16 +248,15 @@ public function getImmediateDescendantsTest()
248248

249249
/** @test */
250250
public function makeBaumTest()
251-
{
252-
$faker = \Faker\Factory::create();
253-
254-
$this->artisan('make:baum ' . $faker->domainWord)
251+
{
252+
$faker = \Faker\Factory::create();
253+
254+
$this->artisan('make:baum '.$faker->domainWord)
255255
->expectsOutput('Model created successfully.')
256256
->assertExitCode(0);
257257

258-
$this->artisan('make:baum ' . $faker->domainWord . ' --force')
258+
$this->artisan('make:baum '.$faker->domainWord.' --force')
259259
->expectsOutput('Model created successfully.')
260260
->assertExitCode(0);
261-
262261
}
263262
}

0 commit comments

Comments
 (0)