@@ -26,11 +26,11 @@ |
||
| 26 | 26 | */ |
| 27 | 27 | public function uploadImageBas64($image, $dir) |
| 28 | 28 | { |
| 29 | - if (! strlen($image)) { |
|
| 29 | + if ( ! strlen($image)) { |
|
| 30 | 30 | return null; |
| 31 | 31 | } |
| 32 | 32 | |
| 33 | - if(filter_var($image, FILTER_VALIDATE_URL)) { |
|
| 33 | + if (filter_var($image, FILTER_VALIDATE_URL)) { |
|
| 34 | 34 | return $image; |
| 35 | 35 | } |
| 36 | 36 | |
@@ -90,7 +90,7 @@ discard block |
||
| 90 | 90 | $this->container['slug'] = Str::slug($this->argument('slug')); |
| 91 | 91 | $this->container['name'] = Str::studly($this->container['slug']); |
| 92 | 92 | $this->container['version'] = '1.0'; |
| 93 | - $this->container['description'] = 'This is the description for the ' . $this->container['name'] . ' module.'; |
|
| 93 | + $this->container['description'] = 'This is the description for the '.$this->container['name'].' module.'; |
|
| 94 | 94 | $this->container['location'] = config('modules.default_location'); |
| 95 | 95 | $this->container['provider'] = config("modules.locations.{$this->container['location']}.provider"); |
| 96 | 96 | $this->container['basename'] = Str::studly($this->container['slug']); |
@@ -123,7 +123,7 @@ discard block |
||
| 123 | 123 | |
| 124 | 124 | $progress->finish(); |
| 125 | 125 | |
| 126 | - event($this->container['slug'] . '.module.made'); |
|
| 126 | + event($this->container['slug'].'.module.made'); |
|
| 127 | 127 | |
| 128 | 128 | $this->info("\nModule generated successfully."); |
| 129 | 129 | } |
@@ -138,18 +138,18 @@ discard block |
||
| 138 | 138 | $manifest = config("modules.locations.$location.manifest") ?: 'module.json'; |
| 139 | 139 | $provider = config("modules.locations.$location.provider") ?: 'ModuleServiceProvider'; |
| 140 | 140 | |
| 141 | - if (!$this->files->isDirectory($root)) { |
|
| 141 | + if ( ! $this->files->isDirectory($root)) { |
|
| 142 | 142 | $this->files->makeDirectory($root); |
| 143 | 143 | } |
| 144 | 144 | |
| 145 | 145 | $directory = module_path(null, $this->container['basename'], $location); |
| 146 | - $source = __DIR__ . '/Stubs/Module'; |
|
| 146 | + $source = __DIR__.'/Stubs/Module'; |
|
| 147 | 147 | |
| 148 | 148 | $this->files->makeDirectory($directory); |
| 149 | 149 | |
| 150 | 150 | $sourceFiles = $this->files->allFiles($source, true); |
| 151 | 151 | |
| 152 | - if (!empty($this->mapping)) { |
|
| 152 | + if ( ! empty($this->mapping)) { |
|
| 153 | 153 | $search = array_keys($this->mapping); |
| 154 | 154 | $replace = array_values($this->mapping); |
| 155 | 155 | } |
@@ -158,11 +158,11 @@ discard block |
||
| 158 | 158 | $contents = $this->replacePlaceholders($file->getContents()); |
| 159 | 159 | $subPath = $file->getRelativePathname(); |
| 160 | 160 | |
| 161 | - if (!empty($this->mapping)) { |
|
| 161 | + if ( ! empty($this->mapping)) { |
|
| 162 | 162 | $subPath = str_replace($search, $replace, $subPath); |
| 163 | 163 | } |
| 164 | 164 | |
| 165 | - $filePath = $directory . '/' . $subPath; |
|
| 165 | + $filePath = $directory.'/'.$subPath; |
|
| 166 | 166 | |
| 167 | 167 | // if the file is module.json, replace it with the custom manifest file name |
| 168 | 168 | if ($file->getFilename() === 'module.json' && $manifest) { |
@@ -177,7 +177,7 @@ discard block |
||
| 177 | 177 | |
| 178 | 178 | $dir = dirname($filePath); |
| 179 | 179 | |
| 180 | - if (! $this->files->isDirectory($dir)) { |
|
| 180 | + if ( ! $this->files->isDirectory($dir)) { |
|
| 181 | 181 | $this->files->makeDirectory($dir, 0755, true); |
| 182 | 182 | } |
| 183 | 183 | |
@@ -210,20 +210,20 @@ discard block |
||
| 210 | 210 | ]; |
| 211 | 211 | |
| 212 | 212 | $replace = [ |
| 213 | - ucfirst($modelNameSingular) . 'Factory', |
|
| 213 | + ucfirst($modelNameSingular).'Factory', |
|
| 214 | 214 | $modelNameSingular, |
| 215 | 215 | $this->container['slug'], |
| 216 | 216 | ucfirst($modelName), |
| 217 | 217 | ucfirst($modelNameSingular), |
| 218 | - ucfirst($modelName) . 'DatabaseSeeder', |
|
| 219 | - ucfirst($modelName) . 'TableSeeder', |
|
| 220 | - ucfirst($modelNameSingular) . 'Controller', |
|
| 221 | - ucfirst($modelNameSingular) . 'Service', |
|
| 222 | - ucfirst($modelNameSingular) . 'Repository', |
|
| 223 | - ucfirst($modelName) . 'Errors', |
|
| 224 | - 'Store' . ucfirst($modelNameSingular), |
|
| 218 | + ucfirst($modelName).'DatabaseSeeder', |
|
| 219 | + ucfirst($modelName).'TableSeeder', |
|
| 220 | + ucfirst($modelNameSingular).'Controller', |
|
| 221 | + ucfirst($modelNameSingular).'Service', |
|
| 222 | + ucfirst($modelNameSingular).'Repository', |
|
| 223 | + ucfirst($modelName).'Errors', |
|
| 224 | + 'Store'.ucfirst($modelNameSingular), |
|
| 225 | 225 | ucfirst($modelNameSingular), |
| 226 | - ucfirst($modelNameSingular) . 'Observer', |
|
| 226 | + ucfirst($modelNameSingular).'Observer', |
|
| 227 | 227 | \Str::snake($modelName), |
| 228 | 228 | $modelName, |
| 229 | 229 | ]; |
@@ -247,6 +247,6 @@ discard block |
||
| 247 | 247 | $modelName = $this->container['slug']; |
| 248 | 248 | $migrationName = \Str::camel($modelName); |
| 249 | 249 | $migrationName = \Str::snake($migrationName); |
| 250 | - return $this->callSilent('make:module:migration', ['slug' => $modelName, 'name' => 'create_' . $migrationName . '_table']); |
|
| 250 | + return $this->callSilent('make:module:migration', ['slug' => $modelName, 'name' => 'create_'.$migrationName.'_table']); |
|
| 251 | 251 | } |
| 252 | 252 | } |
@@ -32,7 +32,7 @@ |
||
| 32 | 32 | { |
| 33 | 33 | $this->call('passport:keys', ['--force' => $this->option('force'), '--length' => $this->option('length')]); |
| 34 | 34 | $oauthClient = \Core::oauthCLients()->first(['password_client' => 1]); |
| 35 | - if (! $oauthClient) { |
|
| 35 | + if ( ! $oauthClient) { |
|
| 36 | 36 | $oauthClient = $client->createPasswordGrantClient( |
| 37 | 37 | null, |
| 38 | 38 | config('app.name'), |
@@ -28,7 +28,7 @@ |
||
| 28 | 28 | public function assignPermissions($roleId, $permissionIds) |
| 29 | 29 | { |
| 30 | 30 | $role = false; |
| 31 | - \DB::transaction(function () use ($roleId, $permissionIds, &$role) { |
|
| 31 | + \DB::transaction(function() use ($roleId, $permissionIds, &$role) { |
|
| 32 | 32 | $role = $this->repo->find($roleId); |
| 33 | 33 | $this->repo->detachPermissions($role); |
| 34 | 34 | $this->repo->attachPermissions($role, $permissionIds); |
@@ -26,7 +26,7 @@ |
||
| 26 | 26 | */ |
| 27 | 27 | public function revoke($clientId) |
| 28 | 28 | { |
| 29 | - \DB::transaction(function () use ($clientId) { |
|
| 29 | + \DB::transaction(function() use ($clientId) { |
|
| 30 | 30 | $client = $this->repo->find($clientId); |
| 31 | 31 | $this->repo->revokeClientTokens($client); |
| 32 | 32 | $this->repo->save(['id'=> $clientId, 'revoked' => true]); |
@@ -40,7 +40,7 @@ |
||
| 40 | 40 | return $values; |
| 41 | 41 | } |
| 42 | 42 | |
| 43 | - if (! $primaryLocale || ! is_object($values) || ! property_exists($values, $primaryLocale)) { |
|
| 43 | + if ( ! $primaryLocale || ! is_object($values) || ! property_exists($values, $primaryLocale)) { |
|
| 44 | 44 | return $values ? (isset($values->$fallbackLocale) ? $values->$fallbackLocale : $values) : ''; |
| 45 | 45 | } |
| 46 | 46 | |
@@ -13,7 +13,7 @@ |
||
| 13 | 13 | */ |
| 14 | 14 | public function up() |
| 15 | 15 | { |
| 16 | - Schema::create('jobs', function (Blueprint $table) { |
|
| 16 | + Schema::create('jobs', function(Blueprint $table) { |
|
| 17 | 17 | $table->increments('id'); |
| 18 | 18 | $table->string('queue'); |
| 19 | 19 | $table->longText('payload'); |
@@ -13,7 +13,7 @@ |
||
| 13 | 13 | */ |
| 14 | 14 | public function up() |
| 15 | 15 | { |
| 16 | - Schema::create('failed_jobs', function (Blueprint $table) { |
|
| 16 | + Schema::create('failed_jobs', function(Blueprint $table) { |
|
| 17 | 17 | $table->increments('id'); |
| 18 | 18 | $table->text('connection'); |
| 19 | 19 | $table->text('queue'); |
@@ -23,9 +23,9 @@ |
||
| 23 | 23 | */ |
| 24 | 24 | public function rules() |
| 25 | 25 | { |
| 26 | - $requiredOrNullable = request()->isMethod('PATCH') ? 'nullable' : 'required' . ''; |
|
| 26 | + $requiredOrNullable = request()->isMethod('PATCH') ? 'nullable' : 'required'.''; |
|
| 27 | 27 | return [ |
| 28 | - 'name' => $requiredOrNullable . '|string|max:100|unique:roles,name,' . $this->route('id') |
|
| 28 | + 'name' => $requiredOrNullable.'|string|max:100|unique:roles,name,'.$this->route('id') |
|
| 29 | 29 | ]; |
| 30 | 30 | } |
| 31 | 31 | } |