Passed
Push — master ( a3b8ff...fcec12 )
by Php Easy Api
03:28
created
src/resta/Foundation/Bootstrapper/Bootstrappers.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
         (new BaseRegister($this->app))->handle();
42 42
 
43 43
         //we save the bootstrapper class in container.
44
-        $this->app->register('bootstrapper',$this);
44
+        $this->app->register('bootstrapper', $this);
45 45
 
46 46
         //call bootstrapper process
47 47
         $this->callBootstrapperProcess();
@@ -59,11 +59,11 @@  discard block
 block discarded – undo
59 59
     {
60 60
         //The boot method to be executed can be specified by the user.
61 61
         //We use this method to know how to customize it.
62
-        BootFireCallback::setBootFire([$this->app,$bootstrapper],function($boot){
62
+        BootFireCallback::setBootFire([$this->app, $bootstrapper], function($boot) {
63 63
 
64 64
             //kernel boots run and service container
65 65
             //makeBuild for service Container
66
-            $this->bootFire($boot,null);
66
+            $this->bootFire($boot, null);
67 67
         });
68 68
     }
69 69
 
@@ -74,11 +74,11 @@  discard block
 block discarded – undo
74 74
      * @param string $maker
75 75
      * @return mixed
76 76
      */
77
-    public function bootFire($boot,$maker)
77
+    public function bootFire($boot, $maker)
78 78
     {
79 79
         // we can refer to this method
80 80
         // because we can boot classes in the middleware or bootstrapper array.
81
-        if(is_null($boot) && !is_null($maker)){
81
+        if (is_null($boot) && !is_null($maker)) {
82 82
 
83 83
             /** @var KernelManifestManager $kernelManifestBind */
84 84
             $kernelManifestBind = $this->app->resolve(KernelManifestManager::class);
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
 
91 91
         // the boot method to be executed can be specified by the user.
92 92
         // we use this method to know how to customize it.
93
-        return forward_static_call_array([array_pop($boot),self::LOADBOOTSTRAPPERS],[$boot]);
93
+        return forward_static_call_array([array_pop($boot), self::LOADBOOTSTRAPPERS], [$boot]);
94 94
     }
95 95
 
96 96
     /**
@@ -101,14 +101,14 @@  discard block
 block discarded – undo
101 101
      */
102 102
     private function bootstrapper(...$params)
103 103
     {
104
-        [$group,$booting,$onion] = $params;
104
+        [$group, $booting, $onion] = $params;
105 105
 
106
-        if($onion){
106
+        if ($onion) {
107 107
 
108 108
             // we will implement a special onion method here and
109 109
             // pass our bootstraper classes through this method.
110 110
             // Our goal here is to implement the middleware layer correctly.
111
-            $this->app->resolve(MiddlewareKernelProvider::class)->onionBoot([$group,$booting],function() use($group){
111
+            $this->app->resolve(MiddlewareKernelProvider::class)->onionBoot([$group, $booting], function() use($group){
112 112
                 $this->boot($group);
113 113
             });
114 114
 
@@ -125,18 +125,18 @@  discard block
 block discarded – undo
125 125
      *
126 126
      * @param array $customBootstrapers
127 127
      */
128
-    public function callBootstrapperProcess($customBootstrapers=[])
128
+    public function callBootstrapperProcess($customBootstrapers = [])
129 129
     {
130 130
         // here we check that a special bootstrappers list will work and we identify the onion identifier.
131 131
         // we are peeling onion class by classifying onion class.
132 132
         $this->getBootstrappersStack($customBootstrapers);
133 133
 
134 134
         //We run the bootstrap list by callback with the object specified for the content respectively.
135
-        foreach($this->stack['getBootstrappers'] as $bootstrapper){
135
+        foreach ($this->stack['getBootstrappers'] as $bootstrapper) {
136 136
 
137 137
             // if the callback data is different from the application kernel,
138 138
             // we will pass it to the pusher control for a special use.
139
-            call_user_func_array([$this,'bootstrapper'],[$bootstrapper,$this,$this->stack['onionIdentifier']]);
139
+            call_user_func_array([$this, 'bootstrapper'], [$bootstrapper, $this, $this->stack['onionIdentifier']]);
140 140
         }
141 141
     }
142 142
 
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
     private function peelings()
163 163
     {
164 164
         //if there are peelings
165
-        if(isset($this->app['peelings'])){
165
+        if (isset($this->app['peelings'])) {
166 166
 
167 167
             // We send the peelings property to
168 168
             // the bootstrapperPeelOnion class.
Please login to merge, or discard this patch.