Passed
Push — main ( 7ec2fe...bfff7a )
by PRATIK
12:40 queued 12s
created
src/Services/RepositoryPatternService.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -66,6 +66,6 @@
 block discarded – undo
66 66
 
67 67
     protected static function makeRequest($name)
68 68
     {
69
-        Artisan::call('make:request ' . $name . 'Request');
69
+        Artisan::call('make:request '.$name.'Request');
70 70
     }
71 71
 }
Please login to merge, or discard this patch.
src/Console/Commands/MakeTraitCommand.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
      */
35 35
     protected function getStub()
36 36
     {
37
-        return __DIR__ . '/../../Console/Commands/AdminStubs/Trait.stub';
37
+        return __DIR__.'/../../Console/Commands/AdminStubs/Trait.stub';
38 38
     }
39 39
 
40 40
     /**
@@ -46,6 +46,6 @@  discard block
 block discarded – undo
46 46
      */
47 47
     protected function getDefaultNamespace($rootNamespace)
48 48
     {
49
-        return $rootNamespace . '\Traits';
49
+        return $rootNamespace.'\Traits';
50 50
     }
51 51
 }
Please login to merge, or discard this patch.
src/Console/Commands/MakeServiceCommand.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
      */
35 35
     protected function getStub()
36 36
     {
37
-        return __DIR__ . '/../../Console/Commands/AdminStubs/Service.stub';
37
+        return __DIR__.'/../../Console/Commands/AdminStubs/Service.stub';
38 38
     }
39 39
 
40 40
     /**
@@ -46,6 +46,6 @@  discard block
 block discarded – undo
46 46
      */
47 47
     protected function getDefaultNamespace($rootNamespace)
48 48
     {
49
-        return $rootNamespace . '\Services';
49
+        return $rootNamespace.'\Services';
50 50
     }
51 51
 }
Please login to merge, or discard this patch.
src/Services/Adminetic.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -163,8 +163,8 @@  discard block
 block discarded – undo
163 163
         $children = [
164 164
             [
165 165
                 'type' => 'submenu',
166
-                'name' => 'All ' . $plural,
167
-                'is_active' => request()->routeIs($route . '.index') ? 'active' : '',
166
+                'name' => 'All '.$plural,
167
+                'is_active' => request()->routeIs($route.'.index') ? 'active' : '',
168 168
                 'link' => adminRedirectRoute($route),
169 169
                 'conditions' => [
170 170
                     [
@@ -175,8 +175,8 @@  discard block
 block discarded – undo
175 175
             ],
176 176
             [
177 177
                 'type' => 'submenu',
178
-                'name' => 'Create ' . $route,
179
-                'is_active' => request()->routeIs($route . '.create') ? 'active' : '',
178
+                'name' => 'Create '.$route,
179
+                'is_active' => request()->routeIs($route.'.create') ? 'active' : '',
180 180
                 'link' => adminCreateRoute($route),
181 181
                 'conditions' => [
182 182
                     [
Please login to merge, or discard this patch.
src/Services/CRUDGeneratorService.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -68,11 +68,11 @@  discard block
 block discarded – undo
68 68
     protected static function makeViews($name, $console)
69 69
     {
70 70
         $lowername = strtolower($name);
71
-        if (!file_exists($path = resource_path('views/admin/' . $lowername))) {
71
+        if (!file_exists($path = resource_path('views/admin/'.$lowername))) {
72 72
             mkdir($path, 0777, true);
73 73
         }
74 74
 
75
-        if (!file_exists($path = resource_path('views/admin/layouts/modules/' . $lowername))) {
75
+        if (!file_exists($path = resource_path('views/admin/layouts/modules/'.$lowername))) {
76 76
             mkdir($path, 0777, true);
77 77
         }
78 78
 
@@ -171,25 +171,25 @@  discard block
 block discarded – undo
171 171
     // Make Other neccesary CRUD files
172 172
     protected static function makeOthers($name, $console)
173 173
     {
174
-        Artisan::call('make:migration create_' . strtolower(Str::plural($name)) . '_table --create=' . strtolower(Str::plural($name)));
175
-        $console->info('Migration file created named create_' . strtolower(Str::plural($name)) . '_table ... ✅');
174
+        Artisan::call('make:migration create_'.strtolower(Str::plural($name)).'_table --create='.strtolower(Str::plural($name)));
175
+        $console->info('Migration file created named create_'.strtolower(Str::plural($name)).'_table ... ✅');
176 176
 
177
-        Artisan::call('make:seeder ' . $name . 'Seeder');
177
+        Artisan::call('make:seeder '.$name.'Seeder');
178 178
         $console->info('Seeder file created ... ✅');
179 179
 
180
-        Artisan::call('make:repo ' . $name);
180
+        Artisan::call('make:repo '.$name);
181 181
         $console->info('Repository and Interface created ... ✅');
182 182
 
183
-        Artisan::call('make:request ' . $name . 'Request');
183
+        Artisan::call('make:request '.$name.'Request');
184 184
         $console->info('Request file created ... ✅');
185 185
     }
186 186
 
187 187
     protected static function fileMadeSuccess($console, $file, $type)
188 188
     {
189 189
         if (file_exists($file)) {
190
-            $console->info($type . ' created successfully ... ✅');
190
+            $console->info($type.' created successfully ... ✅');
191 191
         } else {
192
-            $console->error('Failed to create ' . $type . ' ...');
192
+            $console->error('Failed to create '.$type.' ...');
193 193
         }
194 194
     }
195 195
 }
Please login to merge, or discard this patch.
src/Providers/AdmineticServiceProvider.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -168,7 +168,7 @@  discard block
 block discarded – undo
168 168
      */
169 169
     protected function registerRoutes()
170 170
     {
171
-        Route::group($this->routeConfiguration(), function () {
171
+        Route::group($this->routeConfiguration(), function() {
172 172
             $this->loadRoutesFrom(__DIR__.'/../../routes/web.php');
173 173
         });
174 174
     }
@@ -212,7 +212,7 @@  discard block
 block discarded – undo
212 212
      */
213 213
     protected function directives()
214 214
     {
215
-        Blade::if('hasRole', function ($roles) {
215
+        Blade::if ('hasRole', function($roles) {
216 216
             $hasAccess = false;
217 217
             $roles_array = explode('|', $roles);
218 218
             foreach ($roles_array as $role) {
@@ -221,10 +221,10 @@  discard block
 block discarded – undo
221 221
 
222 222
             return $hasAccess;
223 223
         });
224
-        Blade::if('preference', function ($preference_name, $default_value) {
224
+        Blade::if ('preference', function($preference_name, $default_value) {
225 225
             return preference($preference_name, $default_value);
226 226
         });
227
-        Blade::directive('setting', function ($setting_name) {
227
+        Blade::directive('setting', function($setting_name) {
228 228
             return "<?php echo setting($setting_name) ?>";
229 229
         });
230 230
     }
@@ -301,7 +301,7 @@  discard block
 block discarded – undo
301 301
      */
302 302
     protected function getFacades()
303 303
     {
304
-        $this->app->bind('adminetic', function ($app) {
304
+        $this->app->bind('adminetic', function($app) {
305 305
             return new Adminetic();
306 306
         });
307 307
     }
Please login to merge, or discard this patch.
src/Console/Commands/InstallAdmineticCommand.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
 
67 67
     private function addAdminServiceProvider()
68 68
     {
69
-        $adminServiceProviderTemplate = file_get_contents(__DIR__ . '/../../Console/Commands/AdminStubs/AdminServiceProvider.stub');
69
+        $adminServiceProviderTemplate = file_get_contents(__DIR__.'/../../Console/Commands/AdminStubs/AdminServiceProvider.stub');
70 70
         $adminServiceProviderfile = app_path('Providers/AdminServiceProvider.php');
71 71
         file_put_contents($adminServiceProviderfile, $adminServiceProviderTemplate);
72 72
         if (file_exists($adminServiceProviderfile)) {
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
 
79 79
     private function addMyMenu()
80 80
     {
81
-        $modelTemplate = file_get_contents(__DIR__ . '/../../Console/Commands/AdminStubs/MyMenu.stub');
81
+        $modelTemplate = file_get_contents(__DIR__.'/../../Console/Commands/AdminStubs/MyMenu.stub');
82 82
 
83 83
         if (!file_exists($path = app_path('Services'))) {
84 84
             mkdir($path, 0777, true);
@@ -95,8 +95,8 @@  discard block
 block discarded – undo
95 95
 
96 96
     private function addMyDashboard()
97 97
     {
98
-        $myDashboardTemplate = file_get_contents(__DIR__ . '/../../Console/Commands/AdminStubs/MyDashboard.stub');
99
-        $myDashboardIndexTemplate = file_get_contents(__DIR__ . '/../../Console/Commands/AdminStubs/DashboardIndex.stub');
98
+        $myDashboardTemplate = file_get_contents(__DIR__.'/../../Console/Commands/AdminStubs/MyDashboard.stub');
99
+        $myDashboardIndexTemplate = file_get_contents(__DIR__.'/../../Console/Commands/AdminStubs/DashboardIndex.stub');
100 100
 
101 101
         if (!file_exists($path = app_path('Services'))) {
102 102
             mkdir($path, 0777, true);
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
 
134 134
     protected function addHeader()
135 135
     {
136
-        $myHeaderTemplate = file_get_contents(__DIR__ . '/../../Console/Commands/AdminStubs/HeaderView.stub');
136
+        $myHeaderTemplate = file_get_contents(__DIR__.'/../../Console/Commands/AdminStubs/HeaderView.stub');
137 137
 
138 138
         if (!file_exists($path = resource_path('views/admin/layouts/components'))) {
139 139
             mkdir($path, 0777, true);
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
 
151 151
     protected function addFooter()
152 152
     {
153
-        $myFooterTemplate = file_get_contents(__DIR__ . '/../../Console/Commands/AdminStubs/FooterView.stub');
153
+        $myFooterTemplate = file_get_contents(__DIR__.'/../../Console/Commands/AdminStubs/FooterView.stub');
154 154
 
155 155
         if (!file_exists($path = resource_path('views/admin/layouts/components'))) {
156 156
             mkdir($path, 0777, true);
@@ -167,6 +167,6 @@  discard block
 block discarded – undo
167 167
 
168 168
     protected static function getStub($type)
169 169
     {
170
-        return file_get_contents(__DIR__ . "/../../Console/Commands/AdminStubs/$type.stub");
170
+        return file_get_contents(__DIR__."/../../Console/Commands/AdminStubs/$type.stub");
171 171
     }
172 172
 }
Please login to merge, or discard this patch.
src/Mixins/AdmineticAuthMixins.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -13,10 +13,10 @@  discard block
 block discarded – undo
13 13
          * @return callable
14 14
          */
15 15
 
16
-        return function ($options = []) {
16
+        return function($options = []) {
17 17
             $namespace = "Pratiksh\Adminetic\Http\Controllers";
18 18
 
19
-            $this->group(['namespace' => $namespace], function () use ($options) {
19
+            $this->group(['namespace' => $namespace], function() use ($options) {
20 20
                 if ($options['home'] ?? true) {
21 21
                     $this->view('/', 'adminetic::welcome');
22 22
                 }
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
      */
86 86
     public function resetPassword()
87 87
     {
88
-        return function () {
88
+        return function() {
89 89
             $this->get('password/reset', 'Auth\ForgotPasswordController@showLinkRequestForm')->name('password.request');
90 90
             $this->post('password/email', 'Auth\ForgotPasswordController@sendResetLinkEmail')->name('password.email');
91 91
             $this->get('password/reset/{token}', 'Auth\ResetPasswordController@showResetForm')->name('password.reset');
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
      */
101 101
     public function confirmPassword()
102 102
     {
103
-        return function () {
103
+        return function() {
104 104
             $this->get('password/confirm', 'Auth\ConfirmPasswordController@showConfirmForm')->name('password.confirm');
105 105
             $this->post('password/confirm', 'Auth\ConfirmPasswordController@confirm');
106 106
         };
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
      */
114 114
     public function emailVerification()
115 115
     {
116
-        return function () {
116
+        return function() {
117 117
             $this->get('email/verify', 'Auth\VerificationController@show')->name('verification.notice');
118 118
             $this->get('email/verify/{id}/{hash}', 'Auth\VerificationController@verify')->name('verification.verify');
119 119
             $this->post('email/resend', 'Auth\VerificationController@resend')->name('verification.resend');
Please login to merge, or discard this patch.
src/Helpers/AdminRouteHelper.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@  discard block
 block discarded – undo
6 6
  * @param  string  $route
7 7
  *@return string
8 8
  */
9
-if (! function_exists('adminBaseUrl')) {
9
+if (!function_exists('adminBaseUrl')) {
10 10
     function adminBaseUrl($route)
11 11
     {
12 12
         return url(config('admin.prefix', 'admin').'/'.$route);
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
  *@param string $route
20 20
  *@return string
21 21
  */
22
-if (! function_exists('adminRedirectRoute')) {
22
+if (!function_exists('adminRedirectRoute')) {
23 23
     function adminRedirectRoute($route)
24 24
     {
25 25
         return adminBaseUrl($route);
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
  *@param string $route
33 33
  *@return string
34 34
  */
35
-if (! function_exists('adminCreateRoute')) {
35
+if (!function_exists('adminCreateRoute')) {
36 36
     function adminCreateRoute($route)
37 37
     {
38 38
         return adminBaseUrl($route).'/create';
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
  *@param int $id
47 47
  *@return return_type
48 48
  */
49
-if (! function_exists('adminShowRoute')) {
49
+if (!function_exists('adminShowRoute')) {
50 50
     function adminShowRoute($route, $id)
51 51
     {
52 52
         return adminBaseUrl($route).'/'.$id;
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
  *@param int $id
61 61
  *@return string
62 62
  */
63
-if (! function_exists('adminEditRoute')) {
63
+if (!function_exists('adminEditRoute')) {
64 64
     function adminEditRoute($route, $id)
65 65
     {
66 66
         return adminBaseUrl($route).'/'.$id.'/edit';
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
  *@param string $route
74 74
  *@return string
75 75
  */
76
-if (! function_exists('adminStoreRoute')) {
76
+if (!function_exists('adminStoreRoute')) {
77 77
     function adminStoreRoute($route)
78 78
     {
79 79
         return adminBaseUrl($route);
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
  *@param int $id
88 88
  *@return string
89 89
  */
90
-if (! function_exists('adminUpdateRoute')) {
90
+if (!function_exists('adminUpdateRoute')) {
91 91
     function adminUpdateRoute($route, $id)
92 92
     {
93 93
         return adminBaseUrl($route).'/'.$id;
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
  *@param int $id
102 102
  *@return string
103 103
  */
104
-if (! function_exists('adminDeleteRoute')) {
104
+if (!function_exists('adminDeleteRoute')) {
105 105
     function adminDeleteRoute($route, $id)
106 106
     {
107 107
         return adminBaseUrl($route).'/'.$id;
Please login to merge, or discard this patch.