@@ -4,11 +4,11 @@ discard block |
||
| 4 | 4 | use Modules\Schedule\Entities\Schedule; |
| 5 | 5 | use Modules\Schedule\Entities\WeekDay; |
| 6 | 6 | |
| 7 | -$factory->define(Schedule::class, function (Faker $faker) { |
|
| 8 | - $times = []; |
|
| 7 | +$factory->define(Schedule::class, function(Faker $faker) { |
|
| 8 | + $times = [ ]; |
|
| 9 | 9 | for ($d = 0; $d < 7; $d++) { |
| 10 | 10 | for ($h = 0; $h < 24; $h++) { |
| 11 | - $times[$d][$h] = $faker->boolean; |
|
| 11 | + $times[ $d ][ $h ] = $faker->boolean; |
|
| 12 | 12 | } |
| 13 | 13 | } |
| 14 | 14 | |
@@ -20,7 +20,7 @@ discard block |
||
| 20 | 20 | Schedule::WEEK_DAYS => [ |
| 21 | 21 | WeekDay::MONDAY => WeekDay::fromFactory()->raw(), |
| 22 | 22 | ], |
| 23 | - Schedule::EXCEPTIONS => [], |
|
| 23 | + Schedule::EXCEPTIONS => [ ], |
|
| 24 | 24 | Schedule::RANDOMIZE => $faker->boolean, |
| 25 | 25 | ]; |
| 26 | 26 | }); |
@@ -20,7 +20,7 @@ discard block |
||
| 20 | 20 | { |
| 21 | 21 | private function getAuth0Service() : Auth0Service |
| 22 | 22 | { |
| 23 | - return once(function () { |
|
| 23 | + return once(function() { |
|
| 24 | 24 | return app()->make(Auth0ServiceContract::class); |
| 25 | 25 | }); |
| 26 | 26 | } |
@@ -35,7 +35,7 @@ discard block |
||
| 35 | 35 | |
| 36 | 36 | private function getUserAuth0Token() |
| 37 | 37 | { |
| 38 | - return Cache::remember('testing:http_access_token', 60 * 60, function () { |
|
| 38 | + return Cache::remember('testing:http_access_token', 60 * 60, function() { |
|
| 39 | 39 | try { |
| 40 | 40 | $httpClient = new Client(); |
| 41 | 41 | $response = $httpClient->post(env('AUTH0_DOMAIN').'oauth/token', [ |
@@ -18,14 +18,14 @@ discard block |
||
| 18 | 18 | { |
| 19 | 19 | use Auth0TestUser, UserTestRoles; |
| 20 | 20 | |
| 21 | - protected function http(string $method, string $route, array $payload = [], array $headers = []): TestResponse |
|
| 21 | + protected function http(string $method, string $route, array $payload = [ ], array $headers = [ ]): TestResponse |
|
| 22 | 22 | { |
| 23 | - $headers['Authorization'] = 'Bearer '.$this->getUserAuth0Token()->id_token; |
|
| 23 | + $headers[ 'Authorization' ] = 'Bearer '.$this->getUserAuth0Token()->id_token; |
|
| 24 | 24 | |
| 25 | 25 | return parent::http($method, $route, $payload, $headers); |
| 26 | 26 | } |
| 27 | 27 | |
| 28 | - protected function httpNoAuth(string $method, string $route, array $payload = [], array $headers = []): TestResponse |
|
| 28 | + protected function httpNoAuth(string $method, string $route, array $payload = [ ], array $headers = [ ]): TestResponse |
|
| 29 | 29 | { |
| 30 | 30 | return parent::http($method, $route, $payload, $headers); |
| 31 | 31 | } |
@@ -37,7 +37,7 @@ discard block |
||
| 37 | 37 | |
| 38 | 38 | public function actingAs($user, $driver = null) |
| 39 | 39 | { |
| 40 | - if (! $user->is($this->getTestUser())) { |
|
| 40 | + if (!$user->is($this->getTestUser())) { |
|
| 41 | 41 | throw new \Foundation\Exceptions\Exception('cannot set another user for authorized http tests. Sync other roles/permissions instead.'); |
| 42 | 42 | } |
| 43 | 43 | parent::actingAs($user, $driver); |
@@ -43,7 +43,7 @@ discard block |
||
| 43 | 43 | |
| 44 | 44 | public function read($id) |
| 45 | 45 | { |
| 46 | - if (! $this->service->find($id)->notifiable()->is(auth()->user())) { |
|
| 46 | + if (!$this->service->find($id)->notifiable()->is(auth()->user())) { |
|
| 47 | 47 | throw new NotFoundHttpException('notification not found'); |
| 48 | 48 | } |
| 49 | 49 | |
@@ -56,7 +56,7 @@ discard block |
||
| 56 | 56 | |
| 57 | 57 | public function unread($id) |
| 58 | 58 | { |
| 59 | - if (! $this->service->find($id)->notifiable()->is(auth()->user())) { |
|
| 59 | + if (!$this->service->find($id)->notifiable()->is(auth()->user())) { |
|
| 60 | 60 | throw new NotFoundHttpException('notification not found'); |
| 61 | 61 | } |
| 62 | 62 | |
@@ -66,8 +66,8 @@ |
||
| 66 | 66 | |
| 67 | 67 | public function setRoles($id, array $roles): void |
| 68 | 68 | { |
| 69 | - if (! in_array(Role::MEMBER, $roles)) { |
|
| 70 | - $roles[] = Role::MEMBER; |
|
| 69 | + if (!in_array(Role::MEMBER, $roles)) { |
|
| 70 | + $roles[ ] = Role::MEMBER; |
|
| 71 | 71 | } |
| 72 | 72 | $this->find($id)->syncRoles($roles); |
| 73 | 73 | } |
@@ -27,7 +27,7 @@ discard block |
||
| 27 | 27 | 'TABLE' => 'users' |
| 28 | 28 | ]; |
| 29 | 29 | |
| 30 | - Event::assertDispatched(FileGeneratedEvent::class, function (FileGeneratedEvent $event) use ($expectedDirectoryPath, $expectedStubName, $expectedStubOptions) { |
|
| 30 | + Event::assertDispatched(FileGeneratedEvent::class, function(FileGeneratedEvent $event) use ($expectedDirectoryPath, $expectedStubName, $expectedStubOptions) { |
|
| 31 | 31 | $this->assertStringContainsString($expectedDirectoryPath, $event->getFilePath()); |
| 32 | 32 | $this->assertEquals($expectedStubName, $event->getStubName()); |
| 33 | 33 | $this->assertEquals($expectedStubOptions, $event->getStubOptions()); |
@@ -39,7 +39,7 @@ discard block |
||
| 39 | 39 | { |
| 40 | 40 | Event::fake(); |
| 41 | 41 | GeneratorManager::createMigration("User", "CreateUserCollection", 'users', true); |
| 42 | - Event::assertDispatched(FileGeneratedEvent::class, function (FileGeneratedEvent $event) { |
|
| 42 | + Event::assertDispatched(FileGeneratedEvent::class, function(FileGeneratedEvent $event) { |
|
| 43 | 43 | $this->assertEquals("migration-mongo.stub", $event->getStubName()); |
| 44 | 44 | return true; |
| 45 | 45 | }); |
@@ -51,7 +51,7 @@ discard block |
||
| 51 | 51 | Event::fake(); |
| 52 | 52 | GeneratorManager::createFactory($moduleName, "User"); |
| 53 | 53 | |
| 54 | - $expectedFileName = Larapi::getModule($moduleName)->getFactories()->getPath() . '/UserFactory.php'; |
|
| 54 | + $expectedFileName = Larapi::getModule($moduleName)->getFactories()->getPath().'/UserFactory.php'; |
|
| 55 | 55 | $expectedStubName = "factory.stub"; |
| 56 | 56 | $expectedStubOptions = [ |
| 57 | 57 | 'CLASS' => 'UserFactory', |
@@ -59,7 +59,7 @@ discard block |
||
| 59 | 59 | 'MODEL_NAMESPACE' => 'Modules\User\Entities\User' |
| 60 | 60 | ]; |
| 61 | 61 | |
| 62 | - Event::assertDispatched(FileGeneratedEvent::class, function (FileGeneratedEvent $event) use ($expectedFileName, $expectedStubName, $expectedStubOptions) { |
|
| 62 | + Event::assertDispatched(FileGeneratedEvent::class, function(FileGeneratedEvent $event) use ($expectedFileName, $expectedStubName, $expectedStubOptions) { |
|
| 63 | 63 | $this->assertEquals($expectedFileName, $event->getFilePath()); |
| 64 | 64 | $this->assertEquals($expectedStubName, $event->getStubName()); |
| 65 | 65 | $this->assertEquals($expectedStubOptions, $event->getStubOptions()); |
@@ -73,14 +73,14 @@ discard block |
||
| 73 | 73 | Event::fake(); |
| 74 | 74 | GeneratorManager::createController($moduleName, "UserController"); |
| 75 | 75 | |
| 76 | - $expectedFileName = Larapi::getModule($moduleName)->getControllers()->getPath() . '/UserController.php'; |
|
| 76 | + $expectedFileName = Larapi::getModule($moduleName)->getControllers()->getPath().'/UserController.php'; |
|
| 77 | 77 | $expectedStubName = "controller.stub"; |
| 78 | 78 | $expectedStubOptions = [ |
| 79 | 79 | 'CLASS' => 'UserController', |
| 80 | 80 | 'NAMESPACE' => 'Modules\User\Http\Controllers' |
| 81 | 81 | ]; |
| 82 | 82 | |
| 83 | - Event::assertDispatched(FileGeneratedEvent::class, function (FileGeneratedEvent $event) use ($expectedFileName, $expectedStubName, $expectedStubOptions) { |
|
| 83 | + Event::assertDispatched(FileGeneratedEvent::class, function(FileGeneratedEvent $event) use ($expectedFileName, $expectedStubName, $expectedStubOptions) { |
|
| 84 | 84 | $this->assertEquals($expectedFileName, $event->getFilePath()); |
| 85 | 85 | $this->assertEquals($expectedStubName, $event->getStubName()); |
| 86 | 86 | $this->assertEquals($expectedStubOptions, $event->getStubOptions()); |
@@ -94,7 +94,7 @@ discard block |
||
| 94 | 94 | Event::fake(); |
| 95 | 95 | GeneratorManager::createListener($moduleName, "SendWelcomeMail", "UserRegisteredEvent"); |
| 96 | 96 | |
| 97 | - $expectedFileName = Larapi::getModule($moduleName)->getListeners()->getPath() . '/SendWelcomeMail.php'; |
|
| 97 | + $expectedFileName = Larapi::getModule($moduleName)->getListeners()->getPath().'/SendWelcomeMail.php'; |
|
| 98 | 98 | $expectedStubName = "listener.stub"; |
| 99 | 99 | $expectedStubOptions = [ |
| 100 | 100 | 'CLASS' => 'SendWelcomeMail', |
@@ -103,7 +103,7 @@ discard block |
||
| 103 | 103 | 'SHORTEVENTNAME' => 'UserRegisteredEvent', |
| 104 | 104 | ]; |
| 105 | 105 | |
| 106 | - Event::assertDispatched(FileGeneratedEvent::class, function (FileGeneratedEvent $event) use ($expectedFileName, $expectedStubName, $expectedStubOptions) { |
|
| 106 | + Event::assertDispatched(FileGeneratedEvent::class, function(FileGeneratedEvent $event) use ($expectedFileName, $expectedStubName, $expectedStubOptions) { |
|
| 107 | 107 | $this->assertEquals($expectedFileName, $event->getFilePath()); |
| 108 | 108 | $this->assertEquals($expectedStubName, $event->getStubName()); |
| 109 | 109 | $this->assertEquals($expectedStubOptions, $event->getStubOptions()); |
@@ -115,7 +115,7 @@ discard block |
||
| 115 | 115 | { |
| 116 | 116 | Event::fake(); |
| 117 | 117 | GeneratorManager::createListener("User", "SendWelcomeMail", "UserRegisteredEvent", true); |
| 118 | - Event::assertDispatched(FileGeneratedEvent::class, function (FileGeneratedEvent $event) { |
|
| 118 | + Event::assertDispatched(FileGeneratedEvent::class, function(FileGeneratedEvent $event) { |
|
| 119 | 119 | $this->assertEquals("listener-queued.stub", $event->getStubName()); |
| 120 | 120 | return true; |
| 121 | 121 | }); |
@@ -128,14 +128,14 @@ discard block |
||
| 128 | 128 | Event::fake(); |
| 129 | 129 | GeneratorManager::createJob($moduleName, $fileName, false); |
| 130 | 130 | |
| 131 | - $expectedFileName = Larapi::getModule($moduleName)->getJobs()->getPath() . "/$fileName.php"; |
|
| 131 | + $expectedFileName = Larapi::getModule($moduleName)->getJobs()->getPath()."/$fileName.php"; |
|
| 132 | 132 | $expectedStubName = "job-queued.stub"; |
| 133 | 133 | $expectedStubOptions = [ |
| 134 | 134 | 'NAMESPACE' => 'Modules\User\Jobs', |
| 135 | 135 | 'CLASS' => 'RandomUserJob' |
| 136 | 136 | ]; |
| 137 | 137 | |
| 138 | - Event::assertDispatched(FileGeneratedEvent::class, function (FileGeneratedEvent $event) use ($expectedFileName, $expectedStubName, $expectedStubOptions) { |
|
| 138 | + Event::assertDispatched(FileGeneratedEvent::class, function(FileGeneratedEvent $event) use ($expectedFileName, $expectedStubName, $expectedStubOptions) { |
|
| 139 | 139 | $this->assertEquals($expectedFileName, $event->getFilePath()); |
| 140 | 140 | $this->assertEquals($expectedStubName, $event->getStubName()); |
| 141 | 141 | $this->assertEquals($expectedStubOptions, $event->getStubOptions()); |
@@ -147,7 +147,7 @@ discard block |
||
| 147 | 147 | { |
| 148 | 148 | Event::fake(); |
| 149 | 149 | GeneratorManager::createJob("User", "AJob", true); |
| 150 | - Event::assertDispatched(FileGeneratedEvent::class, function (FileGeneratedEvent $event) { |
|
| 150 | + Event::assertDispatched(FileGeneratedEvent::class, function(FileGeneratedEvent $event) { |
|
| 151 | 151 | $this->assertEquals("job.stub", $event->getStubName()); |
| 152 | 152 | return true; |
| 153 | 153 | }); |
@@ -162,7 +162,7 @@ discard block |
||
| 162 | 162 | Event::fake(); |
| 163 | 163 | GeneratorManager::createCommand($moduleName, $fileName, $commandName); |
| 164 | 164 | |
| 165 | - $expectedFileName = Larapi::getModule($moduleName)->getCommands()->getPath() . "/$fileName.php"; |
|
| 165 | + $expectedFileName = Larapi::getModule($moduleName)->getCommands()->getPath()."/$fileName.php"; |
|
| 166 | 166 | $expectedStubName = "command.stub"; |
| 167 | 167 | $expectedStubOptions = [ |
| 168 | 168 | 'NAMESPACE' => 'Modules\User\Console', |
@@ -170,7 +170,7 @@ discard block |
||
| 170 | 170 | 'COMMAND_NAME' => $commandName |
| 171 | 171 | ]; |
| 172 | 172 | |
| 173 | - Event::assertDispatched(FileGeneratedEvent::class, function (FileGeneratedEvent $event) use ($expectedFileName, $expectedStubName, $expectedStubOptions) { |
|
| 173 | + Event::assertDispatched(FileGeneratedEvent::class, function(FileGeneratedEvent $event) use ($expectedFileName, $expectedStubName, $expectedStubOptions) { |
|
| 174 | 174 | $this->assertEquals($expectedFileName, $event->getFilePath()); |
| 175 | 175 | $this->assertEquals($expectedStubName, $event->getStubName()); |
| 176 | 176 | $this->assertEquals($expectedStubOptions, $event->getStubOptions()); |
@@ -186,14 +186,14 @@ discard block |
||
| 186 | 186 | Event::fake(); |
| 187 | 187 | GeneratorManager::createMiddleware($moduleName, $fileName); |
| 188 | 188 | |
| 189 | - $expectedFileName = Larapi::getModule($moduleName)->getMiddleWare()->getPath() . "/$fileName.php"; |
|
| 189 | + $expectedFileName = Larapi::getModule($moduleName)->getMiddleWare()->getPath()."/$fileName.php"; |
|
| 190 | 190 | $expectedStubName = "middleware.stub"; |
| 191 | 191 | $expectedStubOptions = [ |
| 192 | 192 | 'CLASS' => 'RandomMiddleware', |
| 193 | 193 | 'NAMESPACE' => 'Modules\User\Http\Middleware' |
| 194 | 194 | ]; |
| 195 | 195 | |
| 196 | - Event::assertDispatched(FileGeneratedEvent::class, function (FileGeneratedEvent $event) use ($expectedFileName, $expectedStubName, $expectedStubOptions) { |
|
| 196 | + Event::assertDispatched(FileGeneratedEvent::class, function(FileGeneratedEvent $event) use ($expectedFileName, $expectedStubName, $expectedStubOptions) { |
|
| 197 | 197 | $this->assertEquals($expectedFileName, $event->getFilePath()); |
| 198 | 198 | $this->assertEquals($expectedStubName, $event->getStubName()); |
| 199 | 199 | $this->assertEquals($expectedStubOptions, $event->getStubOptions()); |
@@ -209,14 +209,14 @@ discard block |
||
| 209 | 209 | Event::fake(); |
| 210 | 210 | GeneratorManager::createServiceProvider($moduleName, $fileName); |
| 211 | 211 | |
| 212 | - $expectedFileName = Larapi::getModule($moduleName)->getServiceProviders()->getPath() . "/$fileName.php"; |
|
| 212 | + $expectedFileName = Larapi::getModule($moduleName)->getServiceProviders()->getPath()."/$fileName.php"; |
|
| 213 | 213 | $expectedStubName = "provider.stub"; |
| 214 | 214 | $expectedStubOptions = [ |
| 215 | 215 | 'NAMESPACE' => 'Modules\User\Providers', |
| 216 | 216 | 'CLASS' => 'RandomServiceProvider' |
| 217 | 217 | ]; |
| 218 | 218 | |
| 219 | - Event::assertDispatched(FileGeneratedEvent::class, function (FileGeneratedEvent $event) use ($expectedFileName, $expectedStubName, $expectedStubOptions) { |
|
| 219 | + Event::assertDispatched(FileGeneratedEvent::class, function(FileGeneratedEvent $event) use ($expectedFileName, $expectedStubName, $expectedStubOptions) { |
|
| 220 | 220 | $this->assertEquals($expectedFileName, $event->getFilePath()); |
| 221 | 221 | $this->assertEquals($expectedStubName, $event->getStubName()); |
| 222 | 222 | $this->assertEquals($expectedStubOptions, $event->getStubOptions()); |
@@ -232,14 +232,14 @@ discard block |
||
| 232 | 232 | Event::fake(); |
| 233 | 233 | GeneratorManager::createNotification($moduleName, $fileName); |
| 234 | 234 | |
| 235 | - $expectedFileName = Larapi::getModule($moduleName)->getNotifications()->getPath() . "/$fileName.php"; |
|
| 235 | + $expectedFileName = Larapi::getModule($moduleName)->getNotifications()->getPath()."/$fileName.php"; |
|
| 236 | 236 | $expectedStubName = "notification.stub"; |
| 237 | 237 | $expectedStubOptions = [ |
| 238 | 238 | 'NAMESPACE' => 'Modules\User\Notifications', |
| 239 | 239 | 'CLASS' => 'RandomNotification' |
| 240 | 240 | ]; |
| 241 | 241 | |
| 242 | - Event::assertDispatched(FileGeneratedEvent::class, function (FileGeneratedEvent $event) use ($expectedFileName, $expectedStubName, $expectedStubOptions) { |
|
| 242 | + Event::assertDispatched(FileGeneratedEvent::class, function(FileGeneratedEvent $event) use ($expectedFileName, $expectedStubName, $expectedStubOptions) { |
|
| 243 | 243 | $this->assertEquals($expectedFileName, $event->getFilePath()); |
| 244 | 244 | $this->assertEquals($expectedStubName, $event->getStubName()); |
| 245 | 245 | $this->assertEquals($expectedStubOptions, $event->getStubOptions()); |
@@ -63,8 +63,8 @@ discard block |
||
| 63 | 63 | protected function getArguments() |
| 64 | 64 | { |
| 65 | 65 | return [ |
| 66 | - ['model', InputArgument::REQUIRED, 'The name of model will be created.'], |
|
| 67 | - ['module', InputArgument::OPTIONAL, 'The name of module will be used.'], |
|
| 66 | + [ 'model', InputArgument::REQUIRED, 'The name of model will be created.' ], |
|
| 67 | + [ 'module', InputArgument::OPTIONAL, 'The name of module will be used.' ], |
|
| 68 | 68 | ]; |
| 69 | 69 | } |
| 70 | 70 | |
@@ -76,8 +76,8 @@ discard block |
||
| 76 | 76 | protected function getOptions() |
| 77 | 77 | { |
| 78 | 78 | return [ |
| 79 | - ['fillable', null, InputOption::VALUE_IS_ARRAY, 'The fillable attributes.', null], |
|
| 80 | - ['migration', 'm', InputOption::VALUE_NONE, 'Flag to create associated migrations', null], |
|
| 79 | + [ 'fillable', null, InputOption::VALUE_IS_ARRAY, 'The fillable attributes.', null ], |
|
| 80 | + [ 'migration', 'm', InputOption::VALUE_NONE, 'Flag to create associated migrations', null ], |
|
| 81 | 81 | ]; |
| 82 | 82 | } |
| 83 | 83 | |
@@ -88,7 +88,7 @@ discard block |
||
| 88 | 88 | { |
| 89 | 89 | if ($this->option('migration') === true) { |
| 90 | 90 | $migrationName = 'create_'.$this->createMigrationName().'_table'; |
| 91 | - $this->call('module:make-migration', ['name' => $migrationName, 'module' => $this->argument('module')]); |
|
| 91 | + $this->call('module:make-migration', [ 'name' => $migrationName, 'module' => $this->argument('module') ]); |
|
| 92 | 92 | } |
| 93 | 93 | } |
| 94 | 94 | |
@@ -97,7 +97,7 @@ discard block |
||
| 97 | 97 | */ |
| 98 | 98 | protected function getTemplateContents() |
| 99 | 99 | { |
| 100 | - $module = $this->laravel['modules']->findOrFail($this->getModuleName()); |
|
| 100 | + $module = $this->laravel[ 'modules' ]->findOrFail($this->getModuleName()); |
|
| 101 | 101 | |
| 102 | 102 | return (new Stub('/model.stub', [ |
| 103 | 103 | 'NAME' => $this->getModelName(), |
@@ -107,7 +107,7 @@ discard block |
||
| 107 | 107 | 'LOWER_NAME' => $module->getLowerName(), |
| 108 | 108 | 'MODULE' => $this->getModuleName(), |
| 109 | 109 | 'STUDLY_NAME' => $module->getStudlyName(), |
| 110 | - 'MODULE_NAMESPACE' => $this->laravel['modules']->config('namespace'), |
|
| 110 | + 'MODULE_NAMESPACE' => $this->laravel[ 'modules' ]->config('namespace'), |
|
| 111 | 111 | ]))->render(); |
| 112 | 112 | } |
| 113 | 113 | |
@@ -116,7 +116,7 @@ discard block |
||
| 116 | 116 | */ |
| 117 | 117 | protected function getDestinationFilePath() |
| 118 | 118 | { |
| 119 | - $path = $this->laravel['modules']->getModulePath($this->getModuleName()); |
|
| 119 | + $path = $this->laravel[ 'modules' ]->getModulePath($this->getModuleName()); |
|
| 120 | 120 | |
| 121 | 121 | $modelPath = GenerateConfigReader::read('model'); |
| 122 | 122 | |
@@ -138,7 +138,7 @@ discard block |
||
| 138 | 138 | { |
| 139 | 139 | $fillable = $this->option('fillable'); |
| 140 | 140 | |
| 141 | - if (! is_null($fillable)) { |
|
| 141 | + if (!is_null($fillable)) { |
|
| 142 | 142 | $arrays = explode(',', $fillable); |
| 143 | 143 | |
| 144 | 144 | return json_encode($arrays); |
@@ -154,6 +154,6 @@ discard block |
||
| 154 | 154 | */ |
| 155 | 155 | public function getDefaultNamespace() : string |
| 156 | 156 | { |
| 157 | - return $this->laravel['modules']->config('paths.generator.model.path', 'Entities'); |
|
| 157 | + return $this->laravel[ 'modules' ]->config('paths.generator.model.path', 'Entities'); |
|
| 158 | 158 | } |
| 159 | 159 | } |
@@ -58,7 +58,7 @@ |
||
| 58 | 58 | */ |
| 59 | 59 | protected function getOptions() |
| 60 | 60 | { |
| 61 | - return []; |
|
| 61 | + return [ ]; |
|
| 62 | 62 | } |
| 63 | 63 | |
| 64 | 64 | } |
@@ -51,16 +51,16 @@ |
||
| 51 | 51 | protected function getOptions() |
| 52 | 52 | { |
| 53 | 53 | return [ |
| 54 | - ['sync', null, InputOption::VALUE_NONE, 'Indicates that job should be synchronous.'], |
|
| 54 | + [ 'sync', null, InputOption::VALUE_NONE, 'Indicates that job should be synchronous.' ], |
|
| 55 | 55 | ]; |
| 56 | 56 | } |
| 57 | 57 | |
| 58 | 58 | protected function isJobSynchronous(): bool |
| 59 | 59 | { |
| 60 | - return once(function () { |
|
| 60 | + return once(function() { |
|
| 61 | 61 | $option = $this->option('sync'); |
| 62 | 62 | if ($option !== null) |
| 63 | - $option = (bool)$option; |
|
| 63 | + $option = (bool) $option; |
|
| 64 | 64 | |
| 65 | 65 | return $option === null ? $this->confirm('Should the job run Synchronously?', false) : $option; |
| 66 | 66 | }); |
@@ -59,8 +59,9 @@ |
||
| 59 | 59 | { |
| 60 | 60 | return once(function () { |
| 61 | 61 | $option = $this->option('sync'); |
| 62 | - if ($option !== null) |
|
| 63 | - $option = (bool)$option; |
|
| 62 | + if ($option !== null) { |
|
| 63 | + $option = (bool)$option; |
|
| 64 | + } |
|
| 64 | 65 | |
| 65 | 66 | return $option === null ? $this->confirm('Should the job run Synchronously?', false) : $option; |
| 66 | 67 | }); |