@@ -240,11 +240,11 @@ |
||
| 240 | 240 | {
|
| 241 | 241 | // we use the methodological context |
| 242 | 242 | // for kernel group values that are replaced with revision. |
| 243 | - $revisionBoot = array_search($name,app()->get('revision'));
|
|
| 244 | - if(is_string($revisionBoot) && method_exists($this,$revisionBoot)){
|
|
| 245 | - return $this->{$revisionBoot}();
|
|
| 246 | - } |
|
| 243 | + $revisionBoot = array_search($name,app()->get('revision'));
|
|
| 244 | + if(is_string($revisionBoot) && method_exists($this,$revisionBoot)){
|
|
| 245 | + return $this->{$revisionBoot}();
|
|
| 246 | + } |
|
| 247 | 247 | |
| 248 | - exception()->badFunctionCall('There is no boot method named '.$name);
|
|
| 248 | + exception()->badFunctionCall('There is no boot method named '.$name);
|
|
| 249 | 249 | } |
| 250 | 250 | } |
| 251 | 251 | \ No newline at end of file |
@@ -32,12 +32,12 @@ discard block |
||
| 32 | 32 | {
|
| 33 | 33 | //if the console is true |
| 34 | 34 | //console app runner |
| 35 | - if($this->app->runningInConsole() |
|
| 36 | - && $this->app['isAvailableStore'] && $this->app->checkBindings('appConsole')===false){
|
|
| 35 | + if ($this->app->runningInConsole() |
|
| 36 | + && $this->app['isAvailableStore'] && $this->app->checkBindings('appConsole')===false) {
|
|
| 37 | 37 | |
| 38 | 38 | //If the second parameter is sent true to the application builder, |
| 39 | 39 | //all operations are performed by the console and the custom booting are executed |
| 40 | - $this->app->share('appConsole',ConsoleProvider::class);
|
|
| 40 | + $this->app->share('appConsole', ConsoleProvider::class);
|
|
| 41 | 41 | } |
| 42 | 42 | } |
| 43 | 43 | |
@@ -60,8 +60,8 @@ discard block |
||
| 60 | 60 | {
|
| 61 | 61 | // this is your application's config installer. |
| 62 | 62 | // you can easily access the config variables with the config installer. |
| 63 | - if($this->app->checkBindings('config')===false){
|
|
| 64 | - $this->app->share('config',function($app){
|
|
| 63 | + if ($this->app->checkBindings('config')===false) {
|
|
| 64 | + $this->app->share('config', function($app) {
|
|
| 65 | 65 | return $app['revision']['config'] ?? ConfigProvider::class; |
| 66 | 66 | }); |
| 67 | 67 | } |
@@ -76,8 +76,8 @@ discard block |
||
| 76 | 76 | {
|
| 77 | 77 | // the rest system will assign a random key to your application for you. |
| 78 | 78 | // this application will single the advantages of using the rest system for your application in particular. |
| 79 | - if(core()->isAvailableStore && $this->app->checkBindings('encrypter')===false){
|
|
| 80 | - $this->app->make('encrypter',function($app){
|
|
| 79 | + if (core()->isAvailableStore && $this->app->checkBindings('encrypter')===false) {
|
|
| 80 | + $this->app->make('encrypter', function($app) {
|
|
| 81 | 81 | return $app['revision']['encrypter'] ?? EncrypterProvider::class; |
| 82 | 82 | }); |
| 83 | 83 | } |
@@ -93,8 +93,8 @@ discard block |
||
| 93 | 93 | // it is often helpful to have different configuration values based onUrlParseApplication |
| 94 | 94 | // the environment where the application is running.for example, |
| 95 | 95 | // you may wish to use a different cache driver locally than you do on your production server. |
| 96 | - if($this->app->checkBindings('environment')===false){
|
|
| 97 | - $this->app->share('environment',function($app){
|
|
| 96 | + if ($this->app->checkBindings('environment')===false) {
|
|
| 97 | + $this->app->share('environment', function($app) {
|
|
| 98 | 98 | return $app['revision']['environment'] ?? EnvironmentProvider::class; |
| 99 | 99 | }); |
| 100 | 100 | } |
@@ -110,9 +110,9 @@ discard block |
||
| 110 | 110 | // the eventDispatcher component provides tools |
| 111 | 111 | // that allow your application components to communicate |
| 112 | 112 | // with each other by dispatching events and listening to them. |
| 113 | - if($this->app->checkBindings('eventDispatcher')===false){
|
|
| 114 | - $this->app->share('eventDispatcher',function($app){
|
|
| 115 | - if(Utils::isNamespaceExists(app()->namespace()->serviceEventDispatcher())){
|
|
| 113 | + if ($this->app->checkBindings('eventDispatcher')===false) {
|
|
| 114 | + $this->app->share('eventDispatcher', function($app) {
|
|
| 115 | + if (Utils::isNamespaceExists(app()->namespace()->serviceEventDispatcher())) {
|
|
| 116 | 116 | return $app['revision']['eventDispatcher'] ?? app()->namespace()->serviceEventDispatcher(); |
| 117 | 117 | } |
| 118 | 118 | }); |
@@ -130,8 +130,8 @@ discard block |
||
| 130 | 130 | // to help you learn more about what's happening within your application, |
| 131 | 131 | // rest system provides robust logging services that allow you to log messages to files, |
| 132 | 132 | // the system error log, and even to Slack to notify your entire team. |
| 133 | - if($this->app->checkBindings('logger')===false){
|
|
| 134 | - $this->app->share('logger',function($app){
|
|
| 133 | + if ($this->app->checkBindings('logger')===false) {
|
|
| 134 | + $this->app->share('logger', function($app) {
|
|
| 135 | 135 | return $app['revision']['logger'] ?? LoggerProvider::class; |
| 136 | 136 | }); |
| 137 | 137 | } |
@@ -148,8 +148,8 @@ discard block |
||
| 148 | 148 | // when your application is requested, the middleware classes are running before all bootstrapper executables. |
| 149 | 149 | // thus, if you make http request your application, you can verify with an intermediate middleware layer |
| 150 | 150 | // and throw an exception. |
| 151 | - if($this->app->checkBindings('middleware')===false){
|
|
| 152 | - $this->app->make('middleware',function($app){
|
|
| 151 | + if ($this->app->checkBindings('middleware')===false) {
|
|
| 152 | + $this->app->make('middleware', function($app) {
|
|
| 153 | 153 | return $app['revision']['middleware'] ?? MiddlewareProvider::class; |
| 154 | 154 | }); |
| 155 | 155 | } |
@@ -164,8 +164,8 @@ discard block |
||
| 164 | 164 | {
|
| 165 | 165 | // we determine kind of output with the response manager |
| 166 | 166 | // json as default or [xml,wsdl] |
| 167 | - if($this->app->checkBindings('response')===false){
|
|
| 168 | - $this->app->make('response',function($app){
|
|
| 167 | + if ($this->app->checkBindings('response')===false) {
|
|
| 168 | + $this->app->make('response', function($app) {
|
|
| 169 | 169 | return $app['revision']['response'] ?? ResponseProvider::class; |
| 170 | 170 | }); |
| 171 | 171 | } |
@@ -181,8 +181,8 @@ discard block |
||
| 181 | 181 | // route operations are the last part of the system run. In this section, |
| 182 | 182 | // a route operation is passed through the url process and output is sent to the screen according to |
| 183 | 183 | // the method file to be called by the application |
| 184 | - if(core()->isAvailableStore && $this->app->checkBindings('router')===false){
|
|
| 185 | - $this->app->make('router',function($app){
|
|
| 184 | + if (core()->isAvailableStore && $this->app->checkBindings('router')===false) {
|
|
| 185 | + $this->app->make('router', function($app) {
|
|
| 186 | 186 | return $app['revision']['router'] ?? RouteProvider::class; |
| 187 | 187 | }); |
| 188 | 188 | } |
@@ -195,8 +195,8 @@ discard block |
||
| 195 | 195 | */ |
| 196 | 196 | private function serviceProvider() |
| 197 | 197 | {
|
| 198 | - if($this->app->checkBindings('serviceProvider')===false){
|
|
| 199 | - $this->app->share('serviceProvider',function($app){
|
|
| 198 | + if ($this->app->checkBindings('serviceProvider')===false) {
|
|
| 199 | + $this->app->share('serviceProvider', function($app) {
|
|
| 200 | 200 | return $app['revision']['serviceProvider'] ?? ServiceProvider::class; |
| 201 | 201 | }); |
| 202 | 202 | } |
@@ -221,9 +221,9 @@ discard block |
||
| 221 | 221 | {
|
| 222 | 222 | // with url parsing,the application route for |
| 223 | 223 | // the rest project is determined after the route variables from the URL are assigned to the kernel url object. |
| 224 | - if(count(array_filter(Utils::getRequestPathInfo(),'strlen')) |
|
| 225 | - && $this->app->checkBindings('url')===false){
|
|
| 226 | - $this->app->make('url',function($app){
|
|
| 224 | + if (count(array_filter(Utils::getRequestPathInfo(), 'strlen')) |
|
| 225 | + && $this->app->checkBindings('url')===false) {
|
|
| 226 | + $this->app->make('url', function($app) {
|
|
| 227 | 227 | return $app['revision']['url'] ?? UrlProvider::class; |
| 228 | 228 | }); |
| 229 | 229 | } |
@@ -236,12 +236,12 @@ discard block |
||
| 236 | 236 | * @param $arguments |
| 237 | 237 | * @return mixed |
| 238 | 238 | */ |
| 239 | - public function __call($name,$arguments) |
|
| 239 | + public function __call($name, $arguments) |
|
| 240 | 240 | {
|
| 241 | 241 | // we use the methodological context |
| 242 | 242 | // for kernel group values that are replaced with revision. |
| 243 | - $revisionBoot = array_search($name,app()->get('revision'));
|
|
| 244 | - if(is_string($revisionBoot) && method_exists($this,$revisionBoot)){
|
|
| 243 | + $revisionBoot = array_search($name, app()->get('revision'));
|
|
| 244 | + if (is_string($revisionBoot) && method_exists($this, $revisionBoot)) {
|
|
| 245 | 245 | return $this->{$revisionBoot}();
|
| 246 | 246 | } |
| 247 | 247 | |