Passed
Pull Request — master (#28)
by yasin
17:28
created
src/Parsers/StubParser.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -35,15 +35,15 @@  discard block
 block discarded – undo
35 35
         $this->store = $store;
36 36
     }
37 37
 
38
-    public function setAuthType(bool $hasAuth){
38
+    public function setAuthType(bool $hasAuth) {
39 39
         $this->hasAuth = $hasAuth;
40 40
     }
41 41
 
42
-    public function setFields(array $fields){
42
+    public function setFields(array $fields) {
43 43
         $this->fields = $fields;
44 44
     }
45 45
 
46
-    public function setInputs(array $inputs){
46
+    public function setInputs(array $inputs) {
47 47
         $this->inputs = $inputs;
48 48
     }
49 49
 
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
             $decodedFile = json_decode(File::get($file), 1);
80 80
             $texts = $this->texts;
81 81
             foreach ($texts as $key => $text) {
82
-                if (array_key_exists($key, $decodedFile)){
82
+                if (array_key_exists($key, $decodedFile)) {
83 83
                     unset($texts[$text]);
84 84
                 }
85 85
             }
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
         $fields = array_keys($this->inputs);
107 107
         $str = '';
108 108
 
109
-        if(in_array($this->inputName, $fields)){
109
+        if (in_array($this->inputName, $fields)) {
110 110
             $this->error("Model name must not equal to column names, fix it and rerun command with -f flag");
111 111
             die;
112 112
         }
@@ -177,10 +177,10 @@  discard block
 block discarded – undo
177 177
 
178 178
         foreach ($this->inputs as $key => $field) {
179 179
             $newLine = ($field != end($this->inputs) or $this->hasAuth);
180
-            $str .=  "'$key' => " . '$this' . "->$key,".$this->makeTab(3, $newLine);
180
+            $str .= "'$key' => ".'$this'."->$key,".$this->makeTab(3, $newLine);
181 181
         }
182 182
 
183
-        if($this->hasAuth){
183
+        if ($this->hasAuth) {
184 184
             $str .= "'user_id' => auth()->id(),";
185 185
         }
186 186
 
@@ -190,7 +190,7 @@  discard block
 block discarded – undo
190 190
     /**
191 191
      * Create Blade from stub
192 192
      */
193
-    public function parseBlade($stub){
193
+    public function parseBlade($stub) {
194 194
         $modelName = $this->getModelName($this->parsedModel);
195 195
 
196 196
         $array = [
@@ -217,14 +217,14 @@  discard block
 block discarded – undo
217 217
         $modelName = strtolower($this->getModelName($this->parsedModel));
218 218
         foreach ($fields as $value) {
219 219
             if (!Str::contains($value, '.')) {
220
-                if(!in_array($value, ['image', 'photo', 'profile', 'banner'])) {
221
-                    $str .= '<td> {{ $' . $modelName . '->' . $value . " }} </td>" . $this->makeTab(1, end($fields) != $value);
220
+                if (!in_array($value, ['image', 'photo', 'profile', 'banner'])) {
221
+                    $str .= '<td> {{ $'.$modelName.'->'.$value." }} </td>".$this->makeTab(1, end($fields) != $value);
222 222
                 } else {
223
-                    $str .= '<td><a target="_blank" href="{{ asset($' . $modelName . '->' . $value . ') }}"><img class="rounded-circle img-fluid" width="50" height="50" src="{{ asset($' . $modelName . '->' . $value . ') }}" alt="'.$value.'"></a></td>' . $this->makeTab(1, end($fields) != $value);
223
+                    $str .= '<td><a target="_blank" href="{{ asset($'.$modelName.'->'.$value.') }}"><img class="rounded-circle img-fluid" width="50" height="50" src="{{ asset($'.$modelName.'->'.$value.') }}" alt="'.$value.'"></a></td>'.$this->makeTab(1, end($fields) != $value);
224 224
                 }
225 225
             } else {
226 226
                 $newValue = $this->parseDots($value);
227
-                $str .= '<td> {{ $' . $modelName . '->' . $newValue .' }} </td>' . $this->makeTab(1, end($fields) != $value);
227
+                $str .= '<td> {{ $'.$modelName.'->'.$newValue.' }} </td>'.$this->makeTab(1, end($fields) != $value);
228 228
             }
229 229
         }
230 230
 
@@ -271,7 +271,7 @@  discard block
 block discarded – undo
271 271
     /**
272 272
      * Tab Maker (Each tabs mean 4 space)
273 273
      */
274
-    public function makeTab($count, $newLine = true){
274
+    public function makeTab($count, $newLine = true) {
275 275
         $count = $count * 4;
276 276
         $tabs = str_repeat(' ', $count);
277 277
 
@@ -287,7 +287,7 @@  discard block
 block discarded – undo
287 287
     {
288 288
         $array = explode('.', $field);
289 289
         $str = '';
290
-        foreach ($array as $value){
290
+        foreach ($array as $value) {
291 291
             $str .= ucfirst($value)." ";
292 292
         }
293 293
 
Please login to merge, or discard this patch.
src/Commands/Actions/Reinstall.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@
 block discarded – undo
15 15
     {
16 16
         $status = $this->confirm("Do you really want to reinstall the panel ? (All components will be deleted)", true);
17 17
 
18
-        if(!$status) {
18
+        if (!$status) {
19 19
             $this->info("The process was canceled");
20 20
             return;
21 21
         }
Please login to merge, or discard this patch.
src/EasyPanelServiceProvider.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -36,10 +36,10 @@  discard block
 block discarded – undo
36 36
     public function register()
37 37
     {
38 38
         // Here we merge config with 'easy_panel' key
39
-        $this->mergeConfigFrom(__DIR__ . '/../config/easy_panel_config.php', 'easy_panel');
39
+        $this->mergeConfigFrom(__DIR__.'/../config/easy_panel_config.php', 'easy_panel');
40 40
 
41 41
         // Check the status of module
42
-        if(!config('easy_panel.enable')) {
42
+        if (!config('easy_panel.enable')) {
43 43
             return;
44 44
         }
45 45
 
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
 
50 50
     public function boot()
51 51
     {
52
-        if(!config('easy_panel.enable')) {
52
+        if (!config('easy_panel.enable')) {
53 53
             return;
54 54
         }
55 55
 
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
         $this->bindCommands();
63 63
 
64 64
         // Load Views with 'admin::' prefix
65
-        $this->loadViewsFrom(__DIR__ . '/../resources/views', 'admin');
65
+        $this->loadViewsFrom(__DIR__.'/../resources/views', 'admin');
66 66
 
67 67
         // Register Middleware
68 68
         $this->registerMiddlewareAlias();
@@ -76,13 +76,13 @@  discard block
 block discarded – undo
76 76
 
77 77
     private function defineRoutes()
78 78
     {
79
-        if(!$this->app->routesAreCached()) {
79
+        if (!$this->app->routesAreCached()) {
80 80
             $middlewares = array_merge(['web', 'isAdmin', 'LangChanger'], config('easy_panel.additional_middlewares'));
81 81
             
82 82
             Route::prefix(config('easy_panel.route_prefix'))
83 83
                 ->middleware($middlewares)
84
-                ->name(getRouteName() . '.')
85
-                ->group(__DIR__ . '/routes.php');
84
+                ->name(getRouteName().'.')
85
+                ->group(__DIR__.'/routes.php');
86 86
         }
87 87
     }
88 88
 
@@ -112,15 +112,15 @@  discard block
 block discarded – undo
112 112
 
113 113
     private function mergePublishes()
114 114
     {
115
-        $this->publishes([__DIR__ . '/../config/easy_panel_config.php' => config_path('easy_panel.php')], 'easy-panel-config');
115
+        $this->publishes([__DIR__.'/../config/easy_panel_config.php' => config_path('easy_panel.php')], 'easy-panel-config');
116 116
 
117
-        $this->publishes([__DIR__ . '/../resources/views' => resource_path('/views/vendor/admin')], 'easy-panel-views');
117
+        $this->publishes([__DIR__.'/../resources/views' => resource_path('/views/vendor/admin')], 'easy-panel-views');
118 118
 
119
-        $this->publishes([__DIR__ . '/../resources/assets' => public_path('/assets/admin')], 'easy-panel-styles');
119
+        $this->publishes([__DIR__.'/../resources/assets' => public_path('/assets/admin')], 'easy-panel-styles');
120 120
 
121
-        $this->publishes([__DIR__ . '/../database/migrations/2020_09_05_99999_create_todos_table.php' => base_path('/database/migrations/' . date('Y_m_d') . '_99999_create_admin_todos_table.php')], 'easy-panel-todo');
121
+        $this->publishes([__DIR__.'/../database/migrations/2020_09_05_99999_create_todos_table.php' => base_path('/database/migrations/'.date('Y_m_d').'_99999_create_admin_todos_table.php')], 'easy-panel-todo');
122 122
 
123
-        $this->publishes([__DIR__ . '/../database/migrations/2021_07_17_99999_create_cruds_table.php' => base_path('/database/migrations/' . date('Y_m_d') . '_99999_create_cruds_table.php')], 'easy-panel-migration');
123
+        $this->publishes([__DIR__.'/../database/migrations/2021_07_17_99999_create_cruds_table.php' => base_path('/database/migrations/'.date('Y_m_d').'_99999_create_cruds_table.php')], 'easy-panel-migration');
124 124
 
125 125
         $this->publishes([__DIR__.'/../resources/lang' => resource_path('/lang')], 'easy-panel-lang');
126 126
 
Please login to merge, or discard this patch.