@@ -7,7 +7,7 @@ discard block |
||
7 | 7 | /** |
8 | 8 | * @var array |
9 | 9 | */ |
10 | - protected static $cronScheduler = ['*','*','*','*','*']; |
|
10 | + protected static $cronScheduler = ['*', '*', '*', '*', '*']; |
|
11 | 11 | |
12 | 12 | /** |
13 | 13 | * schedule daily |
@@ -16,7 +16,7 @@ discard block |
||
16 | 16 | * @param int $minute |
17 | 17 | * @return void |
18 | 18 | */ |
19 | - public function daily($hour=0,$minute=0) |
|
19 | + public function daily($hour = 0, $minute = 0) |
|
20 | 20 | { |
21 | 21 | self::$cronScheduler[1] = $hour; |
22 | 22 |
@@ -9,48 +9,48 @@ |
||
9 | 9 | * @param int $minute |
10 | 10 | * @return void |
11 | 11 | */ |
12 | - public function daily($hour=0,$minute=0); |
|
12 | + public function daily($hour = 0, $minute = 0); |
|
13 | 13 | |
14 | 14 | /** |
15 | 15 | * @param integer $day |
16 | 16 | * @return $this |
17 | 17 | */ |
18 | - public function day($day=1); |
|
18 | + public function day($day = 1); |
|
19 | 19 | |
20 | 20 | /** |
21 | 21 | * @param integer $hour |
22 | 22 | * @return $this |
23 | 23 | */ |
24 | - public function everyHour($hour=1); |
|
24 | + public function everyHour($hour = 1); |
|
25 | 25 | |
26 | 26 | /** |
27 | 27 | * @param int $minute |
28 | 28 | * @return $this |
29 | 29 | */ |
30 | - public function everyMinute($minute=1); |
|
30 | + public function everyMinute($minute = 1); |
|
31 | 31 | |
32 | 32 | /** |
33 | 33 | * @param mixed $hour |
34 | 34 | * @return $this |
35 | 35 | */ |
36 | - public function hour($hour='*'); |
|
36 | + public function hour($hour = '*'); |
|
37 | 37 | |
38 | 38 | /** |
39 | 39 | * @param int $minute |
40 | 40 | * @return $this |
41 | 41 | */ |
42 | - public function minute($minute=1); |
|
42 | + public function minute($minute = 1); |
|
43 | 43 | |
44 | 44 | /** |
45 | 45 | * @param mixed $month |
46 | 46 | * @return $this |
47 | 47 | */ |
48 | - public function month($month=1); |
|
48 | + public function month($month = 1); |
|
49 | 49 | |
50 | 50 | /** |
51 | 51 | * @param mixed $week$month |
52 | 52 | * @return $this |
53 | 53 | */ |
54 | - public function week($week=1); |
|
54 | + public function week($week = 1); |
|
55 | 55 | |
56 | 56 | } |
57 | 57 | \ No newline at end of file |
@@ -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 | } |
@@ -78,8 +78,8 @@ discard block |
||
78 | 78 | // it is often helpful to have different configuration values based onUrlParseApplication |
79 | 79 | // the environment where the application is running.for example, |
80 | 80 | // you may wish to use a different cache driver locally than you do on your production server. |
81 | - if($this->app->checkBindings('environment')===false){ |
|
82 | - $this->app->share('environment',function($app){ |
|
81 | + if ($this->app->checkBindings('environment')===false) { |
|
82 | + $this->app->share('environment', function($app) { |
|
83 | 83 | return $app['revision']['environment'] ?? EnvironmentProvider::class; |
84 | 84 | }); |
85 | 85 | } |
@@ -95,9 +95,9 @@ discard block |
||
95 | 95 | // the eventDispatcher component provides tools |
96 | 96 | // that allow your application components to communicate |
97 | 97 | // with each other by dispatching events and listening to them. |
98 | - if($this->app->checkBindings('eventDispatcher')===false){ |
|
99 | - $this->app->share('eventDispatcher',function($app){ |
|
100 | - if(Utils::isNamespaceExists(app()->namespace()->serviceEventDispatcher())){ |
|
98 | + if ($this->app->checkBindings('eventDispatcher')===false) { |
|
99 | + $this->app->share('eventDispatcher', function($app) { |
|
100 | + if (Utils::isNamespaceExists(app()->namespace()->serviceEventDispatcher())) { |
|
101 | 101 | return $app['revision']['eventDispatcher'] ?? app()->namespace()->serviceEventDispatcher(); |
102 | 102 | } |
103 | 103 | }); |
@@ -115,8 +115,8 @@ discard block |
||
115 | 115 | // to help you learn more about what's happening within your application, |
116 | 116 | // rest system provides robust logging services that allow you to log messages to files, |
117 | 117 | // the system error log, and even to Slack to notify your entire team. |
118 | - if($this->app->checkBindings('logger')===false){ |
|
119 | - $this->app->share('logger',function($app){ |
|
118 | + if ($this->app->checkBindings('logger')===false) { |
|
119 | + $this->app->share('logger', function($app) { |
|
120 | 120 | return $app['revision']['logger'] ?? LoggerProvider::class; |
121 | 121 | }); |
122 | 122 | } |
@@ -133,8 +133,8 @@ discard block |
||
133 | 133 | // when your application is requested, the middleware classes are running before all bootstrapper executables. |
134 | 134 | // thus, if you make http request your application, you can verify with an intermediate middleware layer |
135 | 135 | // and throw an exception. |
136 | - if($this->app->checkBindings('middleware')===false){ |
|
137 | - $this->app->make('middleware',function($app){ |
|
136 | + if ($this->app->checkBindings('middleware')===false) { |
|
137 | + $this->app->make('middleware', function($app) { |
|
138 | 138 | return $app['revision']['middleware'] ?? MiddlewareProvider::class; |
139 | 139 | }); |
140 | 140 | } |
@@ -149,8 +149,8 @@ discard block |
||
149 | 149 | { |
150 | 150 | // we determine kind of output with the response manager |
151 | 151 | // json as default or [xml,wsdl] |
152 | - if($this->app->checkBindings('response')===false){ |
|
153 | - $this->app->make('response',function($app){ |
|
152 | + if ($this->app->checkBindings('response')===false) { |
|
153 | + $this->app->make('response', function($app) { |
|
154 | 154 | return $app['revision']['response'] ?? ResponseProvider::class; |
155 | 155 | }); |
156 | 156 | } |
@@ -166,8 +166,8 @@ discard block |
||
166 | 166 | // route operations are the last part of the system run. In this section, |
167 | 167 | // a route operation is passed through the url process and output is sent to the screen according to |
168 | 168 | // the method file to be called by the application |
169 | - if(core()->isAvailableStore && $this->app->checkBindings('route')===false){ |
|
170 | - $this->app->share('route',function($app){ |
|
169 | + if (core()->isAvailableStore && $this->app->checkBindings('route')===false) { |
|
170 | + $this->app->share('route', function($app) { |
|
171 | 171 | return $app['revision']['route'] ?? Route::class; |
172 | 172 | }); |
173 | 173 | } |
@@ -183,8 +183,8 @@ discard block |
||
183 | 183 | // route operations are the last part of the system run. In this section, |
184 | 184 | // a route operation is passed through the url process and output is sent to the screen according to |
185 | 185 | // the method file to be called by the application |
186 | - if(core()->isAvailableStore && $this->app->checkBindings('router')===false){ |
|
187 | - $this->app->make('router',function($app){ |
|
186 | + if (core()->isAvailableStore && $this->app->checkBindings('router')===false) { |
|
187 | + $this->app->make('router', function($app) { |
|
188 | 188 | return $app['revision']['router'] ?? RouteProvider::class; |
189 | 189 | }); |
190 | 190 | } |
@@ -197,8 +197,8 @@ discard block |
||
197 | 197 | */ |
198 | 198 | private function serviceProvider() |
199 | 199 | { |
200 | - if($this->app->checkBindings('serviceProvider')===false){ |
|
201 | - $this->app->share('serviceProvider',function($app){ |
|
200 | + if ($this->app->checkBindings('serviceProvider')===false) { |
|
201 | + $this->app->share('serviceProvider', function($app) { |
|
202 | 202 | return $app['revision']['serviceProvider'] ?? ServiceProvider::class; |
203 | 203 | }); |
204 | 204 | } |
@@ -223,9 +223,9 @@ discard block |
||
223 | 223 | { |
224 | 224 | // with url parsing,the application route for |
225 | 225 | // the rest project is determined after the route variables from the URL are assigned to the kernel url object. |
226 | - if(count(array_filter(Utils::getRequestPathInfo(),'strlen')) |
|
227 | - && $this->app->checkBindings('url')===false){ |
|
228 | - $this->app->make('url',function($app){ |
|
226 | + if (count(array_filter(Utils::getRequestPathInfo(), 'strlen')) |
|
227 | + && $this->app->checkBindings('url')===false) { |
|
228 | + $this->app->make('url', function($app) { |
|
229 | 229 | return $app['revision']['url'] ?? UrlProvider::class; |
230 | 230 | }); |
231 | 231 | } |
@@ -238,12 +238,12 @@ discard block |
||
238 | 238 | * @param $arguments |
239 | 239 | * @return mixed |
240 | 240 | */ |
241 | - public function __call($name,$arguments) |
|
241 | + public function __call($name, $arguments) |
|
242 | 242 | { |
243 | 243 | // we use the methodological context |
244 | 244 | // for kernel group values that are replaced with revision. |
245 | - $revisionBoot = array_search($name,app()->get('revision')); |
|
246 | - if(is_string($revisionBoot) && method_exists($this,$revisionBoot)){ |
|
245 | + $revisionBoot = array_search($name, app()->get('revision')); |
|
246 | + if (is_string($revisionBoot) && method_exists($this, $revisionBoot)) { |
|
247 | 247 | return $this->{$revisionBoot}(); |
248 | 248 | } |
249 | 249 |
@@ -37,8 +37,7 @@ |
||
37 | 37 | return SuperClosure::get($arrayData); |
38 | 38 | } |
39 | 39 | } |
40 | - } |
|
41 | - else{ |
|
40 | + } else{ |
|
42 | 41 | |
43 | 42 | if(isset($serviceJson['container'][$key])){ |
44 | 43 | if($serviceJson['container-format'][$key]=='string'){ |
@@ -20,34 +20,34 @@ |
||
20 | 20 | { |
21 | 21 | $serviceJson = app()->containerCacheFile(); |
22 | 22 | |
23 | - if(file_exists($serviceJson)){ |
|
23 | + if (file_exists($serviceJson)) { |
|
24 | 24 | JsonHandler::$file = $serviceJson; |
25 | 25 | $serviceJson = JsonHandler::get(); |
26 | 26 | |
27 | - $dottedKey = explode('.',$key); |
|
27 | + $dottedKey = explode('.', $key); |
|
28 | 28 | |
29 | - if(count($dottedKey)==2){ |
|
29 | + if (count($dottedKey)==2) { |
|
30 | 30 | |
31 | - if(isset($serviceJson['container'][$dottedKey[0]][$dottedKey[1]])){ |
|
31 | + if (isset($serviceJson['container'][$dottedKey[0]][$dottedKey[1]])) { |
|
32 | 32 | $arrayData = $serviceJson['container'][$dottedKey[0]][$dottedKey[1]]; |
33 | 33 | |
34 | - if($serviceJson['container-format'][$dottedKey[0]][$dottedKey[1]]=='string'){ |
|
34 | + if ($serviceJson['container-format'][$dottedKey[0]][$dottedKey[1]]=='string') { |
|
35 | 35 | return $arrayData; |
36 | 36 | } |
37 | 37 | |
38 | - if($serviceJson['container-format'][$dottedKey[0]][$dottedKey[1]]=='closure'){ |
|
38 | + if ($serviceJson['container-format'][$dottedKey[0]][$dottedKey[1]]=='closure') { |
|
39 | 39 | return SuperClosure::get($arrayData); |
40 | 40 | } |
41 | 41 | } |
42 | 42 | } |
43 | - else{ |
|
43 | + else { |
|
44 | 44 | |
45 | - if(isset($serviceJson['container'][$key])){ |
|
46 | - if($serviceJson['container-format'][$key]=='string'){ |
|
45 | + if (isset($serviceJson['container'][$key])) { |
|
46 | + if ($serviceJson['container-format'][$key]=='string') { |
|
47 | 47 | return $serviceJson['container'][$key]; |
48 | 48 | } |
49 | 49 | |
50 | - if($serviceJson['container-format'][$key]=='closure'){ |
|
50 | + if ($serviceJson['container-format'][$key]=='closure') { |
|
51 | 51 | return SuperClosure::get($serviceJson['container'][$key]); |
52 | 52 | } |
53 | 53 | } |
@@ -85,8 +85,7 @@ discard block |
||
85 | 85 | JsonHandler::set('container-format',[ |
86 | 86 | $deferrableProvide => 'closure' |
87 | 87 | ]); |
88 | - } |
|
89 | - else{ |
|
88 | + } else{ |
|
90 | 89 | JsonHandler::set('container',[ |
91 | 90 | $deferrableProvide => $container |
92 | 91 | ]); |
@@ -96,15 +95,13 @@ discard block |
||
96 | 95 | ]); |
97 | 96 | } |
98 | 97 | |
99 | - } |
|
100 | - else{ |
|
98 | + } else{ |
|
101 | 99 | foreach ($container as $containerKey=>$containerItem) { |
102 | 100 | if($containerItem instanceof \Closure){ |
103 | 101 | JsonHandler::set('container.'.$deferrableProvide.'.'.$containerKey.'',SuperClosure::set($containerItem)); |
104 | 102 | |
105 | 103 | JsonHandler::set('container-format.'.$deferrableProvide.'.'.$containerKey,'closure'); |
106 | - } |
|
107 | - else{ |
|
104 | + } else{ |
|
108 | 105 | JsonHandler::set('container.'.$deferrableProvide.'.'.$containerKey.'',$containerItem); |
109 | 106 | |
110 | 107 | JsonHandler::set('container-format.'.$deferrableProvide.'.'.$containerKey,'string'); |
@@ -198,8 +195,7 @@ discard block |
||
198 | 195 | $this->applyProvider($key,$provider['class']); |
199 | 196 | } |
200 | 197 | |
201 | - } |
|
202 | - else{ |
|
198 | + } else{ |
|
203 | 199 | $this->applyProvider($key,$provider); |
204 | 200 | } |
205 | 201 |
@@ -26,11 +26,11 @@ discard block |
||
26 | 26 | * |
27 | 27 | * @throws FileNotFoundException |
28 | 28 | */ |
29 | - private function applyProvider($key,$provider,$method='register') |
|
29 | + private function applyProvider($key, $provider, $method = 'register') |
|
30 | 30 | { |
31 | 31 | // If the provider classes are a real object |
32 | 32 | // we will run them. |
33 | - if(Utils::isNamespaceExists($provider)){ |
|
33 | + if (Utils::isNamespaceExists($provider)) { |
|
34 | 34 | |
35 | 35 | // after determining whether the register or boot methods |
36 | 36 | // we are running the provider. |
@@ -38,13 +38,13 @@ discard block |
||
38 | 38 | $providerInstance = $this->app->resolve($provider); |
39 | 39 | |
40 | 40 | //we need to do method check for provider. |
41 | - if(method_exists($providerInstance,$method)){ |
|
41 | + if (method_exists($providerInstance, $method)) { |
|
42 | 42 | $providerInstance->{$method}(); |
43 | 43 | |
44 | - if($method=="register"){ |
|
44 | + if ($method=="register") { |
|
45 | 45 | /** @scrutinizer ignore-call */ |
46 | - $this->app->register('loadedProviders',$key,$provider); |
|
47 | - $this->deferrableProvider($providerInstance,$provider); |
|
46 | + $this->app->register('loadedProviders', $key, $provider); |
|
47 | + $this->deferrableProvider($providerInstance, $provider); |
|
48 | 48 | } |
49 | 49 | } |
50 | 50 | } |
@@ -58,58 +58,58 @@ discard block |
||
58 | 58 | * |
59 | 59 | * @throws FileNotFoundException |
60 | 60 | */ |
61 | - private function deferrableProvider($providerInstance,$provider) |
|
61 | + private function deferrableProvider($providerInstance, $provider) |
|
62 | 62 | { |
63 | 63 | $serviceJson = $this->app->containerCacheFile(); |
64 | 64 | |
65 | - if($providerInstance instanceof DeferrableProvider && file_exists($serviceJson)){ |
|
65 | + if ($providerInstance instanceof DeferrableProvider && file_exists($serviceJson)) { |
|
66 | 66 | $deferrableProvides = $providerInstance->provides(); |
67 | 67 | |
68 | 68 | foreach ($deferrableProvides as $deferrableProvide) { |
69 | - if($this->app->has($deferrableProvide)){ |
|
69 | + if ($this->app->has($deferrableProvide)) { |
|
70 | 70 | JsonHandler::$file = $serviceJson; |
71 | 71 | $serviceJson = JsonHandler::get(); |
72 | 72 | |
73 | - if(!isset($serviceJson['providers'][$provider])){ |
|
74 | - JsonHandler::set('providers-deferrable-classes',[ |
|
73 | + if (!isset($serviceJson['providers'][$provider])) { |
|
74 | + JsonHandler::set('providers-deferrable-classes', [ |
|
75 | 75 | $provider => true |
76 | 76 | ]); |
77 | 77 | |
78 | 78 | $container = $this->app->get($deferrableProvide); |
79 | 79 | |
80 | - if(!is_array($container)){ |
|
80 | + if (!is_array($container)) { |
|
81 | 81 | |
82 | - if($container instanceof \Closure){ |
|
83 | - JsonHandler::set('container',[ |
|
82 | + if ($container instanceof \Closure) { |
|
83 | + JsonHandler::set('container', [ |
|
84 | 84 | $deferrableProvide => SuperClosure::set($container) |
85 | 85 | ]); |
86 | 86 | |
87 | - JsonHandler::set('container-format',[ |
|
87 | + JsonHandler::set('container-format', [ |
|
88 | 88 | $deferrableProvide => 'closure' |
89 | 89 | ]); |
90 | 90 | } |
91 | - else{ |
|
92 | - JsonHandler::set('container',[ |
|
91 | + else { |
|
92 | + JsonHandler::set('container', [ |
|
93 | 93 | $deferrableProvide => $container |
94 | 94 | ]); |
95 | 95 | |
96 | - JsonHandler::set('container-format',[ |
|
96 | + JsonHandler::set('container-format', [ |
|
97 | 97 | $deferrableProvide => 'string' |
98 | 98 | ]); |
99 | 99 | } |
100 | 100 | |
101 | 101 | } |
102 | - else{ |
|
102 | + else { |
|
103 | 103 | foreach ($container as $containerKey=>$containerItem) { |
104 | - if($containerItem instanceof \Closure){ |
|
105 | - JsonHandler::set('container.'.$deferrableProvide.'.'.$containerKey.'',SuperClosure::set($containerItem)); |
|
104 | + if ($containerItem instanceof \Closure) { |
|
105 | + JsonHandler::set('container.'.$deferrableProvide.'.'.$containerKey.'', SuperClosure::set($containerItem)); |
|
106 | 106 | |
107 | - JsonHandler::set('container-format.'.$deferrableProvide.'.'.$containerKey,'closure'); |
|
107 | + JsonHandler::set('container-format.'.$deferrableProvide.'.'.$containerKey, 'closure'); |
|
108 | 108 | } |
109 | - else{ |
|
110 | - JsonHandler::set('container.'.$deferrableProvide.'.'.$containerKey.'',$containerItem); |
|
109 | + else { |
|
110 | + JsonHandler::set('container.'.$deferrableProvide.'.'.$containerKey.'', $containerItem); |
|
111 | 111 | |
112 | - JsonHandler::set('container-format.'.$deferrableProvide.'.'.$containerKey,'string'); |
|
112 | + JsonHandler::set('container-format.'.$deferrableProvide.'.'.$containerKey, 'string'); |
|
113 | 113 | } |
114 | 114 | |
115 | 115 | } |
@@ -128,12 +128,12 @@ discard block |
||
128 | 128 | */ |
129 | 129 | private function assignerLoadedProvidersInitialCoreValue() |
130 | 130 | { |
131 | - if(!isset($this->app['loadedProviders'])){ |
|
131 | + if (!isset($this->app['loadedProviders'])) { |
|
132 | 132 | |
133 | 133 | // for loaded providers, |
134 | 134 | // we register an empty array for the container object. |
135 | 135 | /** @scrutinizer ignore-call */ |
136 | - $this->app->register('loadedProviders',[]); |
|
136 | + $this->app->register('loadedProviders', []); |
|
137 | 137 | } |
138 | 138 | } |
139 | 139 | |
@@ -148,7 +148,7 @@ discard block |
||
148 | 148 | /** @scrutinizer ignore-call */ |
149 | 149 | $providers = $this->app->serviceProviders(); |
150 | 150 | |
151 | - if(count($providers)){ |
|
151 | + if (count($providers)) { |
|
152 | 152 | $this->providers = $providers; |
153 | 153 | } |
154 | 154 | |
@@ -162,7 +162,7 @@ discard block |
||
162 | 162 | */ |
163 | 163 | public function handle() |
164 | 164 | { |
165 | - define ('serviceprovider',true); |
|
165 | + define('serviceprovider', true); |
|
166 | 166 | |
167 | 167 | //check providers and resolve |
168 | 168 | $this->resolveProviders($this->getServiceProviders()); |
@@ -175,7 +175,7 @@ discard block |
||
175 | 175 | * |
176 | 176 | * @throws FileNotFoundException |
177 | 177 | */ |
178 | - public function resolveProviders($providers=array()) |
|
178 | + public function resolveProviders($providers = array()) |
|
179 | 179 | { |
180 | 180 | // for loaded providers, |
181 | 181 | // we register an empty array for the container object. |
@@ -184,36 +184,36 @@ discard block |
||
184 | 184 | $serviceJson = []; |
185 | 185 | |
186 | 186 | //first we are running register methods of provider classes. |
187 | - foreach($providers as $key=>$provider){ |
|
187 | + foreach ($providers as $key=>$provider) { |
|
188 | 188 | |
189 | - if(file_exists($this->app->containerCacheFile())){ |
|
189 | + if (file_exists($this->app->containerCacheFile())) { |
|
190 | 190 | JsonHandler::$file = $this->app->containerCacheFile(); |
191 | 191 | $serviceJson = JsonHandler::get(); |
192 | 192 | } |
193 | 193 | |
194 | 194 | // providers can only be installed once. |
195 | 195 | // apply providers and register for kernel |
196 | - if(!isset($this->app['loadedProviders'][$key])){ |
|
196 | + if (!isset($this->app['loadedProviders'][$key])) { |
|
197 | 197 | |
198 | - if(is_array($provider) && isset($provider['status']) && $provider['status']){ |
|
199 | - if(!isset($serviceJson['providers-deferrable-classes'][$provider['class']])){ |
|
200 | - $this->applyProvider($key,$provider['class']); |
|
198 | + if (is_array($provider) && isset($provider['status']) && $provider['status']) { |
|
199 | + if (!isset($serviceJson['providers-deferrable-classes'][$provider['class']])) { |
|
200 | + $this->applyProvider($key, $provider['class']); |
|
201 | 201 | } |
202 | 202 | |
203 | 203 | } |
204 | - else{ |
|
205 | - $this->applyProvider($key,$provider); |
|
204 | + else { |
|
205 | + $this->applyProvider($key, $provider); |
|
206 | 206 | } |
207 | 207 | |
208 | 208 | } |
209 | 209 | } |
210 | 210 | |
211 | 211 | //then we are running boot methods of provider classes. |
212 | - foreach($providers as $key=>$provider){ |
|
212 | + foreach ($providers as $key=>$provider) { |
|
213 | 213 | |
214 | 214 | //if the providers register is already booted. |
215 | - if(isset($this->app['loadedProviders'][$key])){ |
|
216 | - $this->applyProvider($key,$provider,'boot'); |
|
215 | + if (isset($this->app['loadedProviders'][$key])) { |
|
216 | + $this->applyProvider($key, $provider, 'boot'); |
|
217 | 217 | } |
218 | 218 | } |
219 | 219 | } |
@@ -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); |
@@ -98,11 +98,11 @@ discard block |
||
98 | 98 | $this->touch['kernel/worker'] = $this->provider().'/WorkerServiceProvider.php'; |
99 | 99 | $this->touch['kernel/exception'] = $this->provider().'/ExceptionServiceProvider.php'; |
100 | 100 | $this->touch['kernel/entity'] = $this->provider().'/EntityServiceProvider.php'; |
101 | - $this->touch['kernel/cache'] = $this->provider().'/CacheServiceProvider.php'; |
|
101 | + $this->touch['kernel/cache'] = $this->provider().'/CacheServiceProvider.php'; |
|
102 | 102 | $this->touch['kernel/authenticate'] = $this->provider().'/AuthenticateServiceProvider.php'; |
103 | 103 | $this->touch['kernel/role'] = $this->provider().'/RoleServiceProvider.php'; |
104 | 104 | $this->touch['kernel/track'] = $this->provider().'/TrackServiceProvider.php'; |
105 | - $this->touch['test/testcase'] = $this->test().'/TestCase.php'; |
|
105 | + $this->touch['test/testcase'] = $this->test().'/TestCase.php'; |
|
106 | 106 | $this->touch['kernel/consoleevent'] = $this->provider().'/ConsoleEventServiceProvider.php'; |
107 | 107 | $this->touch['middleware/authenticate'] = $this->middleware().'/Authenticate.php'; |
108 | 108 | $this->touch['middleware/ratelimit'] = $this->middleware().'/RateLimit.php'; |
@@ -143,7 +143,7 @@ discard block |
||
143 | 143 | $this->touch['app/gitignore'] = $this->projectPath().'/.gitignore'; |
144 | 144 | $this->touch['app/composer'] = $this->projectPath().'/composer.json'; |
145 | 145 | $this->touch['test/index'] = $this->storage().'/index.html'; |
146 | - $this->touch['exception/authenticate'] = $this->directory['exceptionDir'] .'/AuthenticateException.php'; |
|
146 | + $this->touch['exception/authenticate'] = $this->directory['exceptionDir'].'/AuthenticateException.php'; |
|
147 | 147 | |
148 | 148 | //set project touch |
149 | 149 | $this->file->touch($this); |