@@ -11,7 +11,7 @@ discard block |
||
11 | 11 | * |
12 | 12 | * @var array |
13 | 13 | */ |
14 | - protected $originGroups=[ |
|
14 | + protected $originGroups = [ |
|
15 | 15 | 'url' => 'url', |
16 | 16 | 'route' => 'route', |
17 | 17 | 'environment' => 'environment', |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | * |
37 | 37 | * @var array |
38 | 38 | */ |
39 | - protected $middlewareGroups=[ |
|
39 | + protected $middlewareGroups = [ |
|
40 | 40 | 'middleware' => 'middleware' |
41 | 41 | ]; |
42 | 42 | |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | * |
46 | 46 | * @var array |
47 | 47 | */ |
48 | - protected $reflectionGroups=[ |
|
48 | + protected $reflectionGroups = [ |
|
49 | 49 | 'router' => 'router', |
50 | 50 | 'response' => 'response', |
51 | 51 | ]; |
@@ -33,12 +33,12 @@ discard block |
||
33 | 33 | { |
34 | 34 | //if the console is true |
35 | 35 | //console app runner |
36 | - if($this->app->runningInConsole() |
|
37 | - && $this->app['isAvailableStore'] && $this->app->checkBindings('appConsole')===false){ |
|
36 | + if ($this->app->runningInConsole() |
|
37 | + && $this->app['isAvailableStore'] && $this->app->checkBindings('appConsole')===false) { |
|
38 | 38 | |
39 | 39 | //If the second parameter is sent true to the application builder, |
40 | 40 | //all operations are performed by the console and the custom booting are executed |
41 | - $this->app->share('appConsole',ConsoleProvider::class); |
|
41 | + $this->app->share('appConsole', ConsoleProvider::class); |
|
42 | 42 | } |
43 | 43 | } |
44 | 44 | |
@@ -61,8 +61,8 @@ discard block |
||
61 | 61 | { |
62 | 62 | // this is your application's config installer. |
63 | 63 | // you can easily access the config variables with the config installer. |
64 | - if($this->app->checkBindings('config')===false){ |
|
65 | - $this->app->share('config',function($app){ |
|
64 | + if ($this->app->checkBindings('config')===false) { |
|
65 | + $this->app->share('config', function($app) { |
|
66 | 66 | return $app['revision']['config'] ?? ConfigProvider::class; |
67 | 67 | }); |
68 | 68 | } |
@@ -77,8 +77,8 @@ discard block |
||
77 | 77 | { |
78 | 78 | // the rest system will assign a random key to your application for you. |
79 | 79 | // this application will single the advantages of using the rest system for your application in particular. |
80 | - if(core()->isAvailableStore && $this->app->checkBindings('encrypter')===false){ |
|
81 | - $this->app->make('encrypter',function($app){ |
|
80 | + if (core()->isAvailableStore && $this->app->checkBindings('encrypter')===false) { |
|
81 | + $this->app->make('encrypter', function($app) { |
|
82 | 82 | return $app['revision']['encrypter'] ?? EncrypterProvider::class; |
83 | 83 | }); |
84 | 84 | } |
@@ -94,8 +94,8 @@ discard block |
||
94 | 94 | // it is often helpful to have different configuration values based onUrlParseApplication |
95 | 95 | // the environment where the application is running.for example, |
96 | 96 | // you may wish to use a different cache driver locally than you do on your production server. |
97 | - if($this->app->checkBindings('environment')===false){ |
|
98 | - $this->app->share('environment',function($app){ |
|
97 | + if ($this->app->checkBindings('environment')===false) { |
|
98 | + $this->app->share('environment', function($app) { |
|
99 | 99 | return $app['revision']['environment'] ?? EnvironmentProvider::class; |
100 | 100 | }); |
101 | 101 | } |
@@ -111,9 +111,9 @@ discard block |
||
111 | 111 | // the eventDispatcher component provides tools |
112 | 112 | // that allow your application components to communicate |
113 | 113 | // with each other by dispatching events and listening to them. |
114 | - if($this->app->checkBindings('eventDispatcher')===false){ |
|
115 | - $this->app->share('eventDispatcher',function($app){ |
|
116 | - if(Utils::isNamespaceExists(app()->namespace()->serviceEventDispatcher())){ |
|
114 | + if ($this->app->checkBindings('eventDispatcher')===false) { |
|
115 | + $this->app->share('eventDispatcher', function($app) { |
|
116 | + if (Utils::isNamespaceExists(app()->namespace()->serviceEventDispatcher())) { |
|
117 | 117 | return $app['revision']['eventDispatcher'] ?? app()->namespace()->serviceEventDispatcher(); |
118 | 118 | } |
119 | 119 | }); |
@@ -131,8 +131,8 @@ discard block |
||
131 | 131 | // to help you learn more about what's happening within your application, |
132 | 132 | // rest system provides robust logging services that allow you to log messages to files, |
133 | 133 | // the system error log, and even to Slack to notify your entire team. |
134 | - if($this->app->checkBindings('logger')===false){ |
|
135 | - $this->app->share('logger',function($app){ |
|
134 | + if ($this->app->checkBindings('logger')===false) { |
|
135 | + $this->app->share('logger', function($app) { |
|
136 | 136 | return $app['revision']['logger'] ?? LoggerProvider::class; |
137 | 137 | }); |
138 | 138 | } |
@@ -149,8 +149,8 @@ discard block |
||
149 | 149 | // when your application is requested, the middleware classes are running before all bootstrapper executables. |
150 | 150 | // thus, if you make http request your application, you can verify with an intermediate middleware layer |
151 | 151 | // and throw an exception. |
152 | - if($this->app->checkBindings('middleware')===false){ |
|
153 | - $this->app->make('middleware',function($app){ |
|
152 | + if ($this->app->checkBindings('middleware')===false) { |
|
153 | + $this->app->make('middleware', function($app) { |
|
154 | 154 | return $app['revision']['middleware'] ?? MiddlewareProvider::class; |
155 | 155 | }); |
156 | 156 | } |
@@ -165,8 +165,8 @@ discard block |
||
165 | 165 | { |
166 | 166 | // we determine kind of output with the response manager |
167 | 167 | // json as default or [xml,wsdl] |
168 | - if($this->app->checkBindings('response')===false){ |
|
169 | - $this->app->make('response',function($app){ |
|
168 | + if ($this->app->checkBindings('response')===false) { |
|
169 | + $this->app->make('response', function($app) { |
|
170 | 170 | return $app['revision']['response'] ?? ResponseProvider::class; |
171 | 171 | }); |
172 | 172 | } |
@@ -182,8 +182,8 @@ discard block |
||
182 | 182 | // route operations are the last part of the system run. In this section, |
183 | 183 | // a route operation is passed through the url process and output is sent to the screen according to |
184 | 184 | // the method file to be called by the application |
185 | - if(core()->isAvailableStore && $this->app->checkBindings('route')===false){ |
|
186 | - $this->app->share('route',function($app){ |
|
185 | + if (core()->isAvailableStore && $this->app->checkBindings('route')===false) { |
|
186 | + $this->app->share('route', function($app) { |
|
187 | 187 | return $app['revision']['route'] ?? Route::class; |
188 | 188 | }); |
189 | 189 | } |
@@ -199,8 +199,8 @@ discard block |
||
199 | 199 | // route operations are the last part of the system run. In this section, |
200 | 200 | // a route operation is passed through the url process and output is sent to the screen according to |
201 | 201 | // the method file to be called by the application |
202 | - if(core()->isAvailableStore && $this->app->checkBindings('router')===false){ |
|
203 | - $this->app->make('router',function($app){ |
|
202 | + if (core()->isAvailableStore && $this->app->checkBindings('router')===false) { |
|
203 | + $this->app->make('router', function($app) { |
|
204 | 204 | return $app['revision']['router'] ?? RouteProvider::class; |
205 | 205 | }); |
206 | 206 | } |
@@ -213,8 +213,8 @@ discard block |
||
213 | 213 | */ |
214 | 214 | private function serviceProvider() |
215 | 215 | { |
216 | - if($this->app->checkBindings('serviceProvider')===false){ |
|
217 | - $this->app->share('serviceProvider',function($app){ |
|
216 | + if ($this->app->checkBindings('serviceProvider')===false) { |
|
217 | + $this->app->share('serviceProvider', function($app) { |
|
218 | 218 | return $app['revision']['serviceProvider'] ?? ServiceProvider::class; |
219 | 219 | }); |
220 | 220 | } |
@@ -239,9 +239,9 @@ discard block |
||
239 | 239 | { |
240 | 240 | // with url parsing,the application route for |
241 | 241 | // the rest project is determined after the route variables from the URL are assigned to the kernel url object. |
242 | - if(count(array_filter(Utils::getRequestPathInfo(),'strlen')) |
|
243 | - && $this->app->checkBindings('url')===false){ |
|
244 | - $this->app->make('url',function($app){ |
|
242 | + if (count(array_filter(Utils::getRequestPathInfo(), 'strlen')) |
|
243 | + && $this->app->checkBindings('url')===false) { |
|
244 | + $this->app->make('url', function($app) { |
|
245 | 245 | return $app['revision']['url'] ?? UrlProvider::class; |
246 | 246 | }); |
247 | 247 | } |
@@ -254,12 +254,12 @@ discard block |
||
254 | 254 | * @param $arguments |
255 | 255 | * @return mixed |
256 | 256 | */ |
257 | - public function __call($name,$arguments) |
|
257 | + public function __call($name, $arguments) |
|
258 | 258 | { |
259 | 259 | // we use the methodological context |
260 | 260 | // for kernel group values that are replaced with revision. |
261 | - $revisionBoot = array_search($name,app()->get('revision')); |
|
262 | - if(is_string($revisionBoot) && method_exists($this,$revisionBoot)){ |
|
261 | + $revisionBoot = array_search($name, app()->get('revision')); |
|
262 | + if (is_string($revisionBoot) && method_exists($this, $revisionBoot)) { |
|
263 | 263 | return $this->{$revisionBoot}(); |
264 | 264 | } |
265 | 265 |
@@ -14,7 +14,7 @@ discard block |
||
14 | 14 | /** |
15 | 15 | * @var $type |
16 | 16 | */ |
17 | - public $type='project'; |
|
17 | + public $type = 'project'; |
|
18 | 18 | |
19 | 19 | /** |
20 | 20 | * @var array |
@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | /** |
32 | 32 | * @var $commandRule |
33 | 33 | */ |
34 | - public $commandRule=[]; |
|
34 | + public $commandRule = []; |
|
35 | 35 | |
36 | 36 | /** |
37 | 37 | * @method create |
@@ -46,17 +46,17 @@ discard block |
||
46 | 46 | $this->directory['projectDir'] = $this->projectPath(); |
47 | 47 | $this->argument['exceptionNamespace'] = app()->namespace()->exception(); |
48 | 48 | $this->argument['resourcePath'] = app()->path()->appResourche(); |
49 | - $this->argument['testNamespace'] = app()->namespace()->tests(); |
|
49 | + $this->argument['testNamespace'] = app()->namespace()->tests(); |
|
50 | 50 | |
51 | - $recursiveDefaultDirectory = explode("\\",$this->argument['project']); |
|
51 | + $recursiveDefaultDirectory = explode("\\", $this->argument['project']); |
|
52 | 52 | $this->argument['applicationName'] = pos($recursiveDefaultDirectory); |
53 | 53 | $recursiveDefaultDirectory[] = 'V1'; |
54 | 54 | $recursiveDefaultDirectoryList = []; |
55 | 55 | |
56 | - foreach (array_slice($recursiveDefaultDirectory,1) as $defaultDirectory){ |
|
56 | + foreach (array_slice($recursiveDefaultDirectory, 1) as $defaultDirectory) { |
|
57 | 57 | |
58 | - $recursiveDefaultDirectoryList[]=$defaultDirectory; |
|
59 | - $this->directory[$defaultDirectory.'Path'] = $this->projectPath().''.implode("/",$recursiveDefaultDirectoryList); |
|
58 | + $recursiveDefaultDirectoryList[] = $defaultDirectory; |
|
59 | + $this->directory[$defaultDirectory.'Path'] = $this->projectPath().''.implode("/", $recursiveDefaultDirectoryList); |
|
60 | 60 | } |
61 | 61 | |
62 | 62 | //$this->directory['optionalDir'] = $this->optional(); |
@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | //$this->directory['sourceDir'] = $this->sourceDir(); |
83 | 83 | //$this->directory['sourceSupportDir'] = $this->sourceSupportDir(); |
84 | 84 | //$this->directory['sourceSupportTraitDir'] = $this->sourceSupportDir().'/Traits'; |
85 | - $this->directory['exceptionDir'] = app()->path()->exception(); |
|
85 | + $this->directory['exceptionDir'] = app()->path()->exception(); |
|
86 | 86 | |
87 | 87 | //set project directory |
88 | 88 | $this->file->makeDirectory($this); |
@@ -96,7 +96,7 @@ discard block |
||
96 | 96 | $this->touch['kernel/app'] = $this->provider().'/AppServiceProvider.php'; |
97 | 97 | $this->touch['kernel/worker'] = $this->provider().'/WorkerServiceProvider.php'; |
98 | 98 | //$this->touch['kernel/route'] = $this->provider().'/RouteServiceProvider.php'; |
99 | - $this->touch['test/testcase'] = $this->test().'/TestCase.php'; |
|
99 | + $this->touch['test/testcase'] = $this->test().'/TestCase.php'; |
|
100 | 100 | $this->touch['kernel/consoleevent'] = $this->provider().'/ConsoleEventServiceProvider.php'; |
101 | 101 | $this->touch['middleware/authenticate'] = $this->middleware().'/Authenticate.php'; |
102 | 102 | $this->touch['middleware/ratelimit'] = $this->middleware().'/RateLimit.php'; |
@@ -135,7 +135,7 @@ discard block |
||
135 | 135 | $this->touch['app/gitignore'] = $this->projectPath().'/.gitignore'; |
136 | 136 | $this->touch['app/composer'] = $this->projectPath().'/composer.json'; |
137 | 137 | $this->touch['test/index'] = $this->storage().'/index.html'; |
138 | - $this->touch['exception/authenticate'] = $this->directory['exceptionDir'] .'/AuthenticateException.php'; |
|
138 | + $this->touch['exception/authenticate'] = $this->directory['exceptionDir'].'/AuthenticateException.php'; |
|
139 | 139 | |
140 | 140 | //set project touch |
141 | 141 | $this->file->touch($this); |