@@ -20,7 +20,7 @@ discard block |
||
| 20 | 20 | * @param ApplicationContracts $app |
| 21 | 21 | * @param array $boot |
| 22 | 22 | */ |
| 23 | - public function __construct($app,$boot=array()) |
|
| 23 | + public function __construct($app, $boot = array()) |
|
| 24 | 24 | {
|
| 25 | 25 | parent::__construct($app); |
| 26 | 26 | |
@@ -35,21 +35,21 @@ discard block |
||
| 35 | 35 | * @param array $boots |
| 36 | 36 | * @param bool $defaultBoot |
| 37 | 37 | */ |
| 38 | - private function bootstrapper($boots=array(),$defaultBoot=true) |
|
| 38 | + private function bootstrapper($boots = array(), $defaultBoot = true) |
|
| 39 | 39 | {
|
| 40 | 40 | //boot loop make bind calling |
| 41 | - foreach ($boots as $bootstrapper){
|
|
| 41 | + foreach ($boots as $bootstrapper) {
|
|
| 42 | 42 | |
| 43 | 43 | // for the default boot, we overwrite the bootstrapper class's bootstrapper property |
| 44 | 44 | // and load it with the boot method. |
| 45 | - if($defaultBoot){
|
|
| 45 | + if ($defaultBoot) {
|
|
| 46 | 46 | $this->app->loadIfNotExistBoot([$bootstrapper]); |
| 47 | 47 | } |
| 48 | 48 | // we will use the classical method for classes |
| 49 | 49 | // that will not boot from the kernel. |
| 50 | - else{
|
|
| 51 | - if(Utils::isNamespaceExists($bootstrapper) |
|
| 52 | - && false===isset($this->app['resolve'][$bootstrapper])){
|
|
| 50 | + else {
|
|
| 51 | + if (Utils::isNamespaceExists($bootstrapper) |
|
| 52 | + && false===isset($this->app['resolve'][$bootstrapper])) {
|
|
| 53 | 53 | $this->app->resolve($bootstrapper)->boot(); |
| 54 | 54 | } |
| 55 | 55 | } |
@@ -65,8 +65,8 @@ discard block |
||
| 65 | 65 | private function customBootManifest(callable $callback) |
| 66 | 66 | {
|
| 67 | 67 | //we make custom boot |
| 68 | - if(isset($this->boot['custom'])){
|
|
| 69 | - return call_user_func_array($callback,[$this->boot['custom']]); |
|
| 68 | + if (isset($this->boot['custom'])) {
|
|
| 69 | + return call_user_func_array($callback, [$this->boot['custom']]); |
|
| 70 | 70 | } |
| 71 | 71 | } |
| 72 | 72 | |
@@ -81,8 +81,8 @@ discard block |
||
| 81 | 81 | $defaultBoot = Collection::make($this->boot)->except('custom')->all();
|
| 82 | 82 | |
| 83 | 83 | //custom boot according to manifest bootManager |
| 84 | - $this->customBootManifest(function($boot){
|
|
| 85 | - $this->bootstrapper((array)$boot,false); |
|
| 84 | + $this->customBootManifest(function($boot) {
|
|
| 85 | + $this->bootstrapper((array)$boot, false); |
|
| 86 | 86 | }); |
| 87 | 87 | |
| 88 | 88 | // and as a result we now use |