Completed
Push — master ( 91df31...876b8b )
by Sherif
01:12
created
src/Modules/Users/Routes/api.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@  discard block
 block discarded – undo
13 13
 |
14 14
 */
15 15
 
16
-Route::group(['prefix' => 'users'], function () {
16
+Route::group(['prefix' => 'users'], function() {
17 17
     
18 18
     Route::get('/', 'UserController@index');
19 19
     Route::get('{id}', 'UserController@show');
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
     Route::patch('unblock/{id}', 'UserController@unblock');
26 26
     Route::patch('assign/roles/{id}', 'UserController@assignRoles');
27 27
 
28
-    Route::group(['prefix' => 'account'], function () {
28
+    Route::group(['prefix' => 'account'], function() {
29 29
 
30 30
         Route::get('my', 'UserController@account');
31 31
         Route::get('logout', 'UserController@logout');
Please login to merge, or discard this patch.
src/Modules/Core/Utl/Media.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -26,11 +26,11 @@
 block discarded – undo
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
         
Please login to merge, or discard this patch.
src/Modules/Core/Console/Commands/MakeModuleCommand.php 1 patch
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 }
Please login to merge, or discard this patch.
src/Modules/Core/Console/Commands/PassportInstallCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@
 block discarded – undo
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'),
Please login to merge, or discard this patch.
src/Modules/Roles/Services/RoleService.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@
 block discarded – undo
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);
Please login to merge, or discard this patch.
src/Modules/OauthClients/Services/OauthClientService.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@
 block discarded – undo
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]);
Please login to merge, or discard this patch.
src/Modules/Core/Core.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -19,12 +19,12 @@
 block discarded – undo
19 19
     public function __call($name, $arguments)
20 20
     {
21 21
         foreach (\Module::all() as $module) {
22
-            $nameSpace = 'App\\Modules\\' . $module['basename'] ;
22
+            $nameSpace = 'App\\Modules\\'.$module['basename'];
23 23
             $model = ucfirst(\Str::singular($name));
24
-            if(count($arguments) == 1 && $arguments[0]) {
25
-                $class = $nameSpace . '\\Services\\' . $model . 'Service';
24
+            if (count($arguments) == 1 && $arguments[0]) {
25
+                $class = $nameSpace.'\\Services\\'.$model.'Service';
26 26
             } else {
27
-                $class = $nameSpace . '\\Repositories\\' . $model . 'Repository';
27
+                $class = $nameSpace.'\\Repositories\\'.$model.'Repository';
28 28
             }
29 29
 
30 30
             if (class_exists($class)) {
Please login to merge, or discard this patch.
src/Modules/Core/Traits/Translatable.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
Notifications/Database/Migrations/2017_10_26_154804_create_jobs_table.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@
 block discarded – undo
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');
Please login to merge, or discard this patch.