Passed
Push — master ( 48b13a...a66a71 )
by Php Easy Api
02:52
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.
src/resta/Foundation/Bootstrapper/KernelManifestManager.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
     /**
17 17
      * @var array $makerList
18 18
      */
19
-    protected $makerList=[];
19
+    protected $makerList = [];
20 20
 
21 21
     /**
22 22
      * @var $manifest
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
 
35 35
         // if there is manifest propery in the resta
36 36
         // in this case,manifest property is manifest class
37
-        if($app['isAvailableStore']){
37
+        if ($app['isAvailableStore']) {
38 38
             $this->manifest = $this->manifest->resolve("Src\Manifest");
39 39
         }
40 40
 
@@ -61,11 +61,11 @@  discard block
 block discarded – undo
61 61
     {
62 62
         $app = clone $this;
63 63
 
64
-        return $this->manifest->call(function() use ($maker,$app){
64
+        return $this->manifest->call(function() use ($maker, $app){
65 65
 
66 66
             // As a parameter, the maker variable comes as
67 67
             // the name of the list to be booted.
68
-            if(isset($this->{$maker})){
68
+            if (isset($this->{$maker})) {
69 69
 
70 70
                 //get default maker list
71 71
                 $app->setMakerList($this->{$maker});
@@ -73,13 +73,13 @@  discard block
 block discarded – undo
73 73
                 // we set this condition for users to boot the classes they want in the kernel groups.
74 74
                 // in the manifesto, if the kernel groups method returns an class of arrays
75 75
                 // then these classes will automatically join the kernel groups installation.
76
-                if(isset($this->run) && isset($this->run[$maker]) && is_array($this->run[$maker])){
76
+                if (isset($this->run) && isset($this->run[$maker]) && is_array($this->run[$maker])) {
77 77
 
78 78
                     $appMaker = $this->run[$maker];
79 79
 
80 80
                     // if the makerExtend value in the manifest is a method,
81 81
                     // in this case, the method is executed instead of the object
82
-                    if(method_exists($this,$maker)){
82
+                    if (method_exists($this, $maker)) {
83 83
                         $this->{$maker}(app());
84 84
                     }
85 85
 
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
                     // if the maker is present on a method basis, then the maker list values ​​must be true or false.
91 91
                     // if one of the maker classes is false will not load this maker class.
92 92
                     foreach ($kernelMakers as $kernelMakerAbstract=>$kernelMaker) {
93
-                        if($kernelMaker){
93
+                        if ($kernelMaker) {
94 94
                             $kernelMakers[$kernelMakerAbstract] = $appMaker[$kernelMakerAbstract];
95 95
                         }
96 96
                     }
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
 
103 103
             // revision maker
104 104
             // group name to boot
105
-            if(isset($this->revision)){
105
+            if (isset($this->revision)) {
106 106
                 $app->revisionMaker($this->revision);
107 107
             }
108 108
 
@@ -118,19 +118,19 @@  discard block
 block discarded – undo
118 118
      */
119 119
     public function revisionMaker($revision)
120 120
     {
121
-        if(is_array($revision) && count($this->makerList)){
121
+        if (is_array($revision) && count($this->makerList)) {
122 122
 
123 123
             //We return to the boot list and perform a revision check.
124
-            foreach ($this->makerList as $makerKey=>$makerValue){
124
+            foreach ($this->makerList as $makerKey=>$makerValue) {
125 125
 
126 126
                 // the revision list is presented as a helper method to prevent
127 127
                 // the listener application being booted from taking the entire listener individually.
128
-                if(count($revision) && isset($revision[$makerKey]) && Utils::isNamespaceExists($revision[$makerKey])){
128
+                if (count($revision) && isset($revision[$makerKey]) && Utils::isNamespaceExists($revision[$makerKey])) {
129 129
                     $this->makerList[$makerKey] = $revision[$makerKey];
130 130
 
131 131
                     // if a kernel group key that is changed to revision is an actual class,
132 132
                     // we will save this class to the container object.
133
-                    $this->app->register('revision',$makerValue,$revision[$makerKey]);
133
+                    $this->app->register('revision', $makerValue, $revision[$makerKey]);
134 134
                 }
135 135
             }
136 136
         }
Please login to merge, or discard this patch.