Passed
Push — master ( 2d7f00...8a3a32 )
by Php Easy Api
02:57
created
src/resta/Foundation/PathManager/StaticPathRepository.php 1 patch
Spacing   +36 added lines, -36 removed lines patch added patch discarded remove patch
@@ -12,9 +12,9 @@  discard block
 block discarded – undo
12 12
      * @param null $app
13 13
      * @return string
14 14
      */
15
-    public function app($app=null)
15
+    public function app($app = null)
16 16
     {
17
-        $app=($app===null) ? $this->appDetector() : $app;
17
+        $app = ($app===null) ? $this->appDetector() : $app;
18 18
         return StaticPathModel::appPath().''.DIRECTORY_SEPARATOR.''.Str::slashToBackSlash($app);
19 19
     }
20 20
 
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
      * @param null $app
39 39
      * @return string
40 40
      */
41
-    public function appCall($app=null)
41
+    public function appCall($app = null)
42 42
     {
43 43
         return $this->appVersion($app).''.DIRECTORY_SEPARATOR.''.StaticPathList::$controller;
44 44
     }
@@ -56,9 +56,9 @@  discard block
 block discarded – undo
56 56
      * @param null $app
57 57
      * @return string
58 58
      */
59
-    public function appConfig($app=null)
59
+    public function appConfig($app = null)
60 60
     {
61
-        if(isset(core()->paths['config'])){
61
+        if (isset(core()->paths['config'])) {
62 62
             return core()->paths['config'];
63 63
         }
64 64
         return $this->appVersion($app).''.DIRECTORY_SEPARATOR.''.StaticPathList::$config;
@@ -68,9 +68,9 @@  discard block
 block discarded – undo
68 68
      * @param null $app
69 69
      * @return string
70 70
      */
71
-    public function appHelpers($app=null)
71
+    public function appHelpers($app = null)
72 72
     {
73
-        if(isset(core()->paths['config'])){
73
+        if (isset(core()->paths['config'])) {
74 74
             return core()->paths['config'];
75 75
         }
76 76
         return $this->appVersion($app).''.DIRECTORY_SEPARATOR.''.StaticPathList::$helpers;
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
      * @param null $app
89 89
      * @return mixed
90 90
      */
91
-    public function appFactory($app=null)
91
+    public function appFactory($app = null)
92 92
     {
93 93
         return $this->appVersion($app).''.DIRECTORY_SEPARATOR.''.StaticPathList::$factory;
94 94
     }
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
      */
99 99
     public function appKernel()
100 100
     {
101
-        $kernel     = $this->app().''.DIRECTORY_SEPARATOR.''.StaticPathList::$kernel;
101
+        $kernel = $this->app().''.DIRECTORY_SEPARATOR.''.StaticPathList::$kernel;
102 102
 
103 103
         return $kernel;
104 104
     }
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
      */
109 109
     public function appProvider()
110 110
     {
111
-        $kernel     = $this->app().''.DIRECTORY_SEPARATOR.''.StaticPathList::$kernel.''.DIRECTORY_SEPARATOR.''.StaticPathList::$provider;
111
+        $kernel = $this->app().''.DIRECTORY_SEPARATOR.''.StaticPathList::$kernel.''.DIRECTORY_SEPARATOR.''.StaticPathList::$provider;
112 112
 
113 113
         return $kernel;
114 114
     }
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
      * @param null $app
134 134
      * @return mixed
135 135
      */
136
-    public function appLogger($app=null)
136
+    public function appLogger($app = null)
137 137
     {
138 138
         return $this->appVersion($app).''.DIRECTORY_SEPARATOR.'ServiceLogManager';
139 139
     }
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
      * @param null $app
143 143
      * @return mixed
144 144
      */
145
-    public function appMiddleware($app=null)
145
+    public function appMiddleware($app = null)
146 146
     {
147 147
         return $this->appVersion($app).''.DIRECTORY_SEPARATOR.''.StaticPathList::$middleware;
148 148
     }
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
      * @param null $app
152 152
      * @return mixed
153 153
      */
154
-    public function appMigration($app=null)
154
+    public function appMigration($app = null)
155 155
     {
156 156
         return $this->appVersion($app).''.DIRECTORY_SEPARATOR.''.StaticPathList::$migration;
157 157
     }
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
      * @param null $app
161 161
      * @return mixed
162 162
      */
163
-    public function appModel($app=null)
163
+    public function appModel($app = null)
164 164
     {
165 165
         return $this->appVersion($app).''.DIRECTORY_SEPARATOR.''.StaticPathList::$model;
166 166
     }
@@ -169,7 +169,7 @@  discard block
 block discarded – undo
169 169
      * @param null $app
170 170
      * @return mixed
171 171
      */
172
-    public function appException($app=null)
172
+    public function appException($app = null)
173 173
     {
174 174
         return $this->appVersion().''.DIRECTORY_SEPARATOR.''.StaticPathList::$exception;
175 175
     }
@@ -178,7 +178,7 @@  discard block
 block discarded – undo
178 178
      * @param null $app
179 179
      * @return mixed
180 180
      */
181
-    public function appOptionalEvents($app=null)
181
+    public function appOptionalEvents($app = null)
182 182
     {
183 183
         return $this->appVersion().''.DIRECTORY_SEPARATOR.''.StaticPathList::$events;
184 184
     }
@@ -187,7 +187,7 @@  discard block
 block discarded – undo
187 187
      * @param null $app
188 188
      * @return mixed
189 189
      */
190
-    public function appOptionalJob($app=null)
190
+    public function appOptionalJob($app = null)
191 191
     {
192 192
         return $this->appVersion($app).''.DIRECTORY_SEPARATOR.''.StaticPathList::$optional.''.DIRECTORY_SEPARATOR.''.StaticPathList::$job;
193 193
     }
@@ -196,7 +196,7 @@  discard block
 block discarded – undo
196 196
      * @param null $app
197 197
      * @return mixed
198 198
      */
199
-    public function appOptionalListeners($app=null)
199
+    public function appOptionalListeners($app = null)
200 200
     {
201 201
         return $this->appVersion().''.DIRECTORY_SEPARATOR.''.StaticPathList::$listeners;
202 202
     }
@@ -205,7 +205,7 @@  discard block
 block discarded – undo
205 205
      * @param null $app
206 206
      * @return mixed
207 207
      */
208
-    public function appOptionalSubscribers($app=null)
208
+    public function appOptionalSubscribers($app = null)
209 209
     {
210 210
         return $this->appVersion().''.DIRECTORY_SEPARATOR.''.StaticPathList::$listeners.''.DIRECTORY_SEPARATOR.''.StaticPathList::$subscribers;
211 211
     }
@@ -223,7 +223,7 @@  discard block
 block discarded – undo
223 223
      */
224 224
     public function appRepository()
225 225
     {
226
-        $repository     = $this->app().''.DIRECTORY_SEPARATOR.''.StaticPathList::$repository;
226
+        $repository = $this->app().''.DIRECTORY_SEPARATOR.''.StaticPathList::$repository;
227 227
 
228 228
         return $repository;
229 229
     }
@@ -240,7 +240,7 @@  discard block
 block discarded – undo
240 240
      * @param null $app
241 241
      * @return mixed
242 242
      */
243
-    public function appOptionalSource($app=null)
243
+    public function appOptionalSource($app = null)
244 244
     {
245 245
         return $this->appVersion($app).''.DIRECTORY_SEPARATOR.''.StaticPathList::$optional.''.DIRECTORY_SEPARATOR.''.StaticPathList::$sourcePath;
246 246
     }
@@ -249,7 +249,7 @@  discard block
 block discarded – undo
249 249
      * @param null $app
250 250
      * @return mixed
251 251
      */
252
-    public function appOptionalWebservice($app=null)
252
+    public function appOptionalWebservice($app = null)
253 253
     {
254 254
         return $this->appVersion($app).''.DIRECTORY_SEPARATOR.''.StaticPathList::$optional.''.DIRECTORY_SEPARATOR.''.StaticPathList::$webservice;
255 255
     }
@@ -266,7 +266,7 @@  discard block
 block discarded – undo
266 266
      * @param null $app
267 267
      * @return mixed
268 268
      */
269
-    public function appServiceAnnotations($app=null)
269
+    public function appServiceAnnotations($app = null)
270 270
     {
271 271
         return $this->appVersion($app).''.DIRECTORY_SEPARATOR.''.StaticPathList::$serviceAnnotations;
272 272
     }
@@ -275,7 +275,7 @@  discard block
 block discarded – undo
275 275
      * @param null $app
276 276
      * @return mixed
277 277
      */
278
-    public function appServiceContainer($app=null)
278
+    public function appServiceContainer($app = null)
279 279
     {
280 280
         return $this->appVersion($app).''.DIRECTORY_SEPARATOR.'ServiceContainerController';
281 281
     }
@@ -284,7 +284,7 @@  discard block
 block discarded – undo
284 284
      * @param null $app
285 285
      * @return mixed
286 286
      */
287
-    public function appServiceEventDispatcher($app=null)
287
+    public function appServiceEventDispatcher($app = null)
288 288
     {
289 289
         return $this->appVersion($app).''.DIRECTORY_SEPARATOR.'ServiceEventDispatcherManager';
290 290
     }
@@ -293,7 +293,7 @@  discard block
 block discarded – undo
293 293
      * @param null $app
294 294
      * @return mixed
295 295
      */
296
-    public function appServiceMiddleware($app=null)
296
+    public function appServiceMiddleware($app = null)
297 297
     {
298 298
         return $this->appVersion($app).''.DIRECTORY_SEPARATOR.''.StaticPathList::$serviceMiddleware;
299 299
     }
@@ -320,9 +320,9 @@  discard block
 block discarded – undo
320 320
      * @param null $app
321 321
      * @return mixed
322 322
      */
323
-    public function appVersion($app=null)
323
+    public function appVersion($app = null)
324 324
     {
325
-        if(defined('app')){
325
+        if (defined('app')) {
326 326
 
327 327
             $prefixGroup = Str::slashToBackSlash(StaticPathList::$projectPrefixGroup);
328 328
 
@@ -366,19 +366,19 @@  discard block
 block discarded – undo
366 366
      * @param bool $bool
367 367
      * @return mixed
368 368
      */
369
-    public function controller($controller=null,$bool=false)
369
+    public function controller($controller = null, $bool = false)
370 370
     {
371 371
         $namespaceController = ($controller===null) ? app()->namespace()->controller()
372
-            : app()->namespace()->controller($controller,true);
372
+            : app()->namespace()->controller($controller, true);
373 373
 
374
-        if($bool){
375
-            $namespaceControllerExplode = explode("\\",$namespaceController);
374
+        if ($bool) {
375
+            $namespaceControllerExplode = explode("\\", $namespaceController);
376 376
             array_pop($namespaceControllerExplode);
377 377
 
378
-            $namespaceController = implode("\\",$namespaceControllerExplode);
378
+            $namespaceController = implode("\\", $namespaceControllerExplode);
379 379
         }
380 380
 
381
-        return Utils::getPathFromNamespace($namespaceController,false);
381
+        return Utils::getPathFromNamespace($namespaceController, false);
382 382
     }
383 383
 
384 384
     /**
@@ -402,9 +402,9 @@  discard block
 block discarded – undo
402 402
      * @param $arg
403 403
      * @return mixed
404 404
      */
405
-    public function __call($name,$arg)
405
+    public function __call($name, $arg)
406 406
     {
407
-        $appCall='app'.ucfirst($name);
407
+        $appCall = 'app'.ucfirst($name);
408 408
         return $this->{$appCall}();
409 409
     }
410 410
 
Please login to merge, or discard this patch.
src/resta/Foundation/PathManager/StaticPathList.php 1 patch
Spacing   +49 added lines, -49 removed lines patch added patch discarded remove patch
@@ -7,247 +7,247 @@
 block discarded – undo
7 7
     /**
8 8
      * @var string
9 9
      */
10
-    public static $appDefine='src';
10
+    public static $appDefine = 'src';
11 11
 
12 12
     /**
13 13
      * @var string
14 14
      */
15
-    public static $autoloadNamespace='App';
15
+    public static $autoloadNamespace = 'App';
16 16
 
17 17
     /**
18 18
      * @var string
19 19
      */
20
-    public static $projectPrefixGroup='Api';
20
+    public static $projectPrefixGroup = 'Api';
21 21
 
22 22
     /**
23 23
      * @var string
24 24
      */
25
-    public static $methodPrefix='Action';
25
+    public static $methodPrefix = 'Action';
26 26
 
27 27
     /**
28 28
      * @var string
29 29
      */
30
-    public static $callClassPrefix='Controller';
30
+    public static $callClassPrefix = 'Controller';
31 31
 
32 32
     /**
33 33
      * @var string
34 34
      */
35
-    public static $controllerBundleName='';
35
+    public static $controllerBundleName = '';
36 36
 
37 37
     /**
38 38
      * @var string
39 39
      */
40
-    public static $resourceInController='Resource';
40
+    public static $resourceInController = 'Resource';
41 41
 
42 42
     /**
43 43
      * @var string
44 44
      */
45
-    public static $configurationInController='Config';
45
+    public static $configurationInController = 'Config';
46 46
 
47 47
     /**
48 48
      * @var null
49 49
      */
50
-    public static $appPath=null;
50
+    public static $appPath = null;
51 51
 
52 52
     /**
53 53
      * @var $kernel
54 54
      */
55
-    public static $kernel='Kernel';
55
+    public static $kernel = 'Kernel';
56 56
 
57 57
     /**
58 58
      * @var $repository
59 59
      */
60
-    public static $repository='Repository';
60
+    public static $repository = 'Repository';
61 61
 
62 62
     /**
63 63
      * @var $listener
64 64
      */
65
-    public static $listener='Listener';
65
+    public static $listener = 'Listener';
66 66
 
67 67
     /**
68 68
      * @var $repository
69 69
      */
70
-    public static $serviceAnnotations='ServiceAnnotationsManager';
70
+    public static $serviceAnnotations = 'ServiceAnnotationsManager';
71 71
 
72 72
     /**
73 73
      * @var $repository
74 74
      */
75
-    public static $serviceMiddleware='ServiceMiddlewareManager';
75
+    public static $serviceMiddleware = 'ServiceMiddlewareManager';
76 76
 
77 77
     /**
78 78
      * @var $storage
79 79
      */
80
-    public static $storage='Storage';
80
+    public static $storage = 'Storage';
81 81
 
82 82
     /**
83 83
      * @var $controller
84 84
      */
85
-    public static $controller='Controllers';
85
+    public static $controller = 'Controllers';
86 86
 
87 87
     /**
88 88
      * @var $platform
89 89
      */
90
-    public static $platform='__Platform';
90
+    public static $platform = '__Platform';
91 91
 
92 92
     /**
93 93
      * @var $sourcePath
94 94
      */
95
-    public static $sourcePath='Source';
95
+    public static $sourcePath = 'Source';
96 96
 
97 97
     /**
98 98
      * @var $sourceRequest
99 99
      */
100
-    public static $sourceRequest='Request';
100
+    public static $sourceRequest = 'Request';
101 101
 
102 102
     /**
103 103
      * @var $model
104 104
      */
105
-    public static $model='Model';
105
+    public static $model = 'Model';
106 106
 
107 107
     /**
108 108
      * @var $builder
109 109
      */
110
-    public static $builder='Builder';
110
+    public static $builder = 'Builder';
111 111
 
112 112
     /**
113 113
      * @var $migration
114 114
      */
115
-    public static $migration='Migrations';
115
+    public static $migration = 'Migrations';
116 116
 
117 117
     /**
118 118
      * @var $config
119 119
      */
120
-    public static $config='Config';
120
+    public static $config = 'Config';
121 121
 
122 122
     /**
123 123
      * @var string $helpers
124 124
      */
125
-    public static $helpers='Helpers';
125
+    public static $helpers = 'Helpers';
126 126
 
127 127
     /**
128 128
      * @var $config
129 129
      */
130
-    public static $test='Tests';
130
+    public static $test = 'Tests';
131 131
 
132 132
 
133 133
     /**
134 134
      * @var $optional
135 135
      */
136
-    public static $optional='Optional';
136
+    public static $optional = 'Optional';
137 137
 
138 138
     /**
139 139
      * @var $events
140 140
      */
141
-    public static $events='Events';
141
+    public static $events = 'Events';
142 142
 
143 143
     /**
144 144
      * @var $listeners
145 145
      */
146
-    public static $listeners='Listeners';
146
+    public static $listeners = 'Listeners';
147 147
 
148 148
     /**
149 149
      * @var $subscribers
150 150
      */
151
-    public static $subscribers='Subscribers';
151
+    public static $subscribers = 'Subscribers';
152 152
 
153 153
     /**
154 154
      * @var $exception
155 155
      */
156
-    public static $exception='Exceptions';
156
+    public static $exception = 'Exceptions';
157 157
 
158 158
     /**
159 159
      * @var $job
160 160
      */
161
-    public static $job='Job';
161
+    public static $job = 'Job';
162 162
 
163 163
 
164 164
     /**
165 165
      * @var $webservice
166 166
      */
167
-    public static $webservice='Webservice';
167
+    public static $webservice = 'Webservice';
168 168
 
169 169
     /**
170 170
      * @var $log
171 171
      */
172
-    public static $log='Log';
172
+    public static $log = 'Log';
173 173
 
174 174
 
175 175
     /**
176 176
      * @var $resource
177 177
      */
178
-    public static $resource='Resource';
178
+    public static $resource = 'Resource';
179 179
 
180 180
     /**
181 181
      * @var $cache
182 182
      */
183
-    public static $cache='Cache';
183
+    public static $cache = 'Cache';
184 184
 
185 185
     /**
186 186
      * @var $language
187 187
      */
188
-    public static $language='Language';
188
+    public static $language = 'Language';
189 189
     /**
190 190
      * @var $session
191 191
      */
192
-    public static $session='Session';
192
+    public static $session = 'Session';
193 193
 
194 194
     /**
195 195
      * @var $middleware
196 196
      */
197
-    public static $middleware='Middleware';
197
+    public static $middleware = 'Middleware';
198 198
 
199 199
     /**
200 200
      * @var string $route
201 201
      */
202
-    public static $route='Routes';
202
+    public static $route = 'Routes';
203 203
 
204 204
     /**
205 205
      * @var string
206 206
      */
207
-    public static $request='Request';
207
+    public static $request = 'Request';
208 208
 
209 209
     /**
210 210
      * @var $factory
211 211
      */
212
-    public static $factory='Factory';
212
+    public static $factory = 'Factory';
213 213
 
214 214
     /**
215 215
      * @var $node
216 216
      */
217
-    public static $node='Node';
217
+    public static $node = 'Node';
218 218
 
219 219
     /**
220 220
      * @var $node
221 221
      */
222
-    public static $provider='Providers';
222
+    public static $provider = 'Providers';
223 223
 
224 224
     /**
225 225
      * @var $once
226 226
      */
227
-    public static $once='Once';
227
+    public static $once = 'Once';
228 228
 
229 229
     /**
230 230
      * @var $command
231 231
      */
232
-    public static $command='Command';
232
+    public static $command = 'Command';
233 233
 
234 234
     /**
235 235
      * @var $stub
236 236
      */
237
-    public static $stub='Stub';
237
+    public static $stub = 'Stub';
238 238
 
239 239
     /**
240 240
      * @var $store
241 241
      */
242
-    public static $store='Store';
242
+    public static $store = 'Store';
243 243
 
244 244
     /**
245 245
      * @var $boot
246 246
      */
247
-    public static $boot='Boot';
247
+    public static $boot = 'Boot';
248 248
 
249 249
     /**
250 250
      * @var $store
251 251
      */
252
-    public static $autoService='Autoservice';
252
+    public static $autoService = 'Autoservice';
253 253
 }
254 254
\ No newline at end of file
Please login to merge, or discard this patch.