Passed
Push — master ( 5d2efa...6fcc64 )
by Php Easy Api
02:59
created
src/resta/Foundation/ApplicationBaseRegister.php 2 patches
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -139,12 +139,12 @@
 block discarded – undo
139 139
         if(Utils::isNamespaceExists($requestService)){
140 140
 
141 141
             Request::setFactory(function(array $query = array(),
142
-                                         array $request = array(),
143
-                                         array $attributes = array(),
144
-                                         array $cookies = array(),
145
-                                         array $files = array(),
146
-                                         array $server = array(),
147
-                                         $content = null) use ($requestService)
142
+                                            array $request = array(),
143
+                                            array $attributes = array(),
144
+                                            array $cookies = array(),
145
+                                            array $files = array(),
146
+                                            array $server = array(),
147
+                                            $content = null) use ($requestService)
148 148
             {
149 149
                 return new $requestService($query,
150 150
                     $request,
Please login to merge, or discard this patch.
Spacing   +32 added lines, -32 removed lines patch added patch discarded remove patch
@@ -29,11 +29,11 @@  discard block
 block discarded – undo
29 29
         // if the store directory is available,
30 30
         // then the application process continues.
31 31
         // if not available, only the core is executed.
32
-        if(file_exists(app()->path()->storeDir())){
33
-            $this->app->register('isAvailableStore',true);
32
+        if (file_exists(app()->path()->storeDir())) {
33
+            $this->app->register('isAvailableStore', true);
34 34
         }
35
-        else{
36
-            $this->app->register('isAvailableStore',false);
35
+        else {
36
+            $this->app->register('isAvailableStore', false);
37 37
         }
38 38
     }
39 39
 
@@ -47,10 +47,10 @@  discard block
 block discarded – undo
47 47
     {
48 48
         //we can use this method to move an instance of the application class with the kernel object
49 49
         //and easily resolve an encrypted instance of all the kernel variables in our helper class.
50
-        ClassAliasGroup::setAlias(App::class,'application');
50
+        ClassAliasGroup::setAlias(App::class, 'application');
51 51
 
52 52
         //we define the general application instance object.
53
-        define('appInstance',(base64_encode(serialize($this))));
53
+        define('appInstance', (base64_encode(serialize($this))));
54 54
 
55 55
         //main loader for application
56 56
         $this->mainLoader();
@@ -65,8 +65,8 @@  discard block
 block discarded – undo
65 65
         // this function can be used for defining your own way of handling errors during runtime,
66 66
         // for example in applications in which you need to do cleanup of data/files when a critical error happens,
67 67
         // or when you need to trigger an error under certain conditions (using trigger_error()).
68
-        if($this->app['isAvailableStore']){
69
-            $this->app->make('exception',function(){
68
+        if ($this->app['isAvailableStore']) {
69
+            $this->app->make('exception', function() {
70 70
                 return ErrorProvider::class;
71 71
             });
72 72
         }
@@ -80,41 +80,41 @@  discard block
 block discarded – undo
80 80
     private function mainLoader()
81 81
     {
82 82
         //set containerInstanceResolve class
83
-        $this->app->register('containerInstanceResolve',ContainerInstanceResolver::class);
83
+        $this->app->register('containerInstanceResolve', ContainerInstanceResolver::class);
84 84
 
85 85
         //register as instance application object
86 86
         // and container instance resolve
87 87
         //set core instance value
88
-        $this->app->register('kernel',$this->app->singleton());
89
-        $this->app->register('bootLoader',$this->app->resolve(BootLoader::class));
90
-        $this->app->register('reflection',ReflectionProcess::class);
88
+        $this->app->register('kernel', $this->app->singleton());
89
+        $this->app->register('bootLoader', $this->app->resolve(BootLoader::class));
90
+        $this->app->register('reflection', ReflectionProcess::class);
91 91
 
92 92
         // for revision records,
93 93
         // the master key is assigned as revision.
94
-        $this->app->register('revision',[]);
94
+        $this->app->register('revision', []);
95 95
 
96 96
         //we're saving the directory where kernel files are running to the kernel object.
97
-        $this->app->register('corePath',str_replace('Foundation','',__DIR__.''));
97
+        $this->app->register('corePath', str_replace('Foundation', '', __DIR__.''));
98 98
 
99 99
         //For the application, we create the object that the register method,
100 100
         // which is the container center, is connected to by the kernel object register method.
101
-        $this->app->register('container',$this->app);
101
+        $this->app->register('container', $this->app);
102 102
 
103 103
         // We are saving the application class to
104 104
         // the container object for the appClass value.
105
-        $this->app->register('appClass',new App());
105
+        $this->app->register('appClass', new App());
106 106
 
107 107
         //set closure bind instance for application
108
-        $this->app->register('appClosureInstance',ClosureDispatcher::bind(app()));
108
+        $this->app->register('appClosureInstance', ClosureDispatcher::bind(app()));
109 109
 
110 110
         //set closure bind instance for bootLoader class
111
-        $this->app->register('closureBootLoader',ClosureDispatcher::bind($this->app['bootLoader']));
111
+        $this->app->register('closureBootLoader', ClosureDispatcher::bind($this->app['bootLoader']));
112 112
 
113 113
         //set register for macro
114
-        $this->app->register('macro',$this->app->resolve(Macro::class));
114
+        $this->app->register('macro', $this->app->resolve(Macro::class));
115 115
 
116 116
         //set register for macro
117
-        $this->app->register('pipeline',new Pipeline());
117
+        $this->app->register('pipeline', new Pipeline());
118 118
 
119 119
     }
120 120
 
@@ -124,19 +124,19 @@  discard block
 block discarded – undo
124 124
     private function setGlobalAccessor()
125 125
     {
126 126
         //get response success and status
127
-        $this->app->register('instanceController',null);
128
-        $this->app->register('responseSuccess',true);
129
-        $this->app->register('responseStatus',200);
130
-        $this->app->register('responseType','json');
127
+        $this->app->register('instanceController', null);
128
+        $this->app->register('responseSuccess', true);
129
+        $this->app->register('responseStatus', 200);
130
+        $this->app->register('responseType', 'json');
131 131
 
132 132
         //we first load the response class as a singleton object to allow you to send output anywhere
133
-        $this->app->register('out',$this->app->resolve(ResponseProvider::class));
133
+        $this->app->register('out', $this->app->resolve(ResponseProvider::class));
134 134
 
135 135
         $requestService = "Store\Services\RequestService";
136 136
 
137 137
         //The HttpFoundation component defines an object-oriented layer for the HTTP specification.
138 138
         //The HttpFoundation component replaces these default PHP global variables and functions by an object-oriented layer
139
-        if(Utils::isNamespaceExists($requestService)){
139
+        if (Utils::isNamespaceExists($requestService)) {
140 140
 
141 141
             Request::setFactory(function(array $query = array(),
142 142
                                          array $request = array(),
@@ -158,16 +158,16 @@  discard block
 block discarded – undo
158 158
 
159 159
 
160 160
         //After registering the symfony request method, we also save the get and post methods for user convenience.
161
-        $this->app->register('request',Request::createFromGlobals());
162
-        $this->app->register('get',core()->request->query->all());
163
-        $this->app->register('post',core()->request->request->all());
161
+        $this->app->register('request', Request::createFromGlobals());
162
+        $this->app->register('get', core()->request->query->all());
163
+        $this->app->register('post', core()->request->request->all());
164 164
 
165 165
         //We determine with the kernel object which HTTP method the requested from the client
166
-        $this->app->register('httpMethod',ucfirst(strtolower(core()->request->getRealMethod())));
166
+        $this->app->register('httpMethod', ucfirst(strtolower(core()->request->getRealMethod())));
167 167
 
168
-        define('httpMethod',strtoupper(core()->httpMethod));
168
+        define('httpMethod', strtoupper(core()->httpMethod));
169 169
 
170
-        $this->app->register('fileSystem',new FileProcess());
170
+        $this->app->register('fileSystem', new FileProcess());
171 171
     }
172 172
 
173 173
 }
174 174
\ No newline at end of file
Please login to merge, or discard this patch.
src/resta/Container/Container.php 1 patch
Spacing   +57 added lines, -57 removed lines patch added patch discarded remove patch
@@ -7,12 +7,12 @@  discard block
 block discarded – undo
7 7
 use Resta\Contracts\ContainerContracts;
8 8
 use Resta\Container\ContainerKernelAssigner;
9 9
 
10
-class Container implements ContainerContracts,\ArrayAccess
10
+class Container implements ContainerContracts, \ArrayAccess
11 11
 {
12 12
     /**
13 13
      * @var $singleton
14 14
      */
15
-    public $singleton=false;
15
+    public $singleton = false;
16 16
 
17 17
     /**
18 18
      * @var $kernel
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
     /**
23 23
      * @var array  $instance
24 24
      */
25
-    private static $instance=[];
25
+    private static $instance = [];
26 26
 
27 27
     /**
28 28
      * @var array $instances
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
     /**
33 33
      * @var array $bindParams
34 34
      */
35
-    private static $bindParams=[];
35
+    private static $bindParams = [];
36 36
 
37 37
     /**
38 38
      * @var $unregister
@@ -42,19 +42,19 @@  discard block
 block discarded – undo
42 42
     /**
43 43
      * @var array
44 44
      */
45
-    protected $values=[];
45
+    protected $values = [];
46 46
 
47 47
     /**
48 48
      * @param $make
49 49
      * @param array $bind
50 50
      * @return array
51 51
      */
52
-    public function applicationProviderBinding($make,$bind=array())
52
+    public function applicationProviderBinding($make, $bind = array())
53 53
     {
54 54
         //service container is an automatic application provider
55 55
         //that we can bind to the special class di in the dependency condition.
56 56
         //This method is automatically added to the classes resolved by the entire make bind method.
57
-        return array_merge($bind,['app'=>$make]);
57
+        return array_merge($bind, ['app'=>$make]);
58 58
     }
59 59
 
60 60
     /**
@@ -65,12 +65,12 @@  discard block
 block discarded – undo
65 65
      * @throws \DI\DependencyException
66 66
      * @throws \DI\NotFoundException
67 67
      */
68
-    public function bind($object=null,$callback=null)
68
+    public function bind($object = null, $callback = null)
69 69
     {
70 70
         //If the bind method does not have parameters object and callback, the value is directly assigned to the kernel object.
71 71
         //Otherwise, when the bind object and callback are sent, the closure class inherits
72 72
         //the applicationProvider object and the resolve method is called
73
-        return $this->make($object,$callback,'container');
73
+        return $this->make($object, $callback, 'container');
74 74
     }
75 75
 
76 76
     /**
@@ -82,16 +82,16 @@  discard block
 block discarded – undo
82 82
      * @throws \DI\DependencyException
83 83
      * @throws \DI\NotFoundException
84 84
      */
85
-    private function build($object,$callback,$sync=false)
85
+    private function build($object, $callback, $sync = false)
86 86
     {
87 87
         //If the console object returns true,
88 88
         //we do not cancel binding operations
89 89
         //We are getting what applies to console with consoleKernelObject.
90
-        if($sync===false) return $this->consoleKernelObjectChecker($object,$callback);
90
+        if ($sync===false) return $this->consoleKernelObjectChecker($object, $callback);
91 91
 
92 92
         //the value corresponding to the bind value for the global object is assigned and
93 93
         //the resolve method is called for the dependency injection.
94
-        $this->kernelAssigner()->setKernelObject($object,$callback);
94
+        $this->kernelAssigner()->setKernelObject($object, $callback);
95 95
 
96 96
         //return kernel object
97 97
         return $this->kernel();
@@ -106,11 +106,11 @@  discard block
 block discarded – undo
106 106
      * @throws \DI\DependencyException
107 107
      * @throws \DI\NotFoundException
108 108
      */
109
-    private function consoleKernelObject($object,$callback,$container=false)
109
+    private function consoleKernelObject($object, $callback, $container = false)
110 110
     {
111 111
         //we use the console bindings class to specify the classes to be preloaded in the console application.
112 112
         //Thus, classes that can not be bound with http are called without closure in global loaders directory.
113
-        $this->resolve(ConsoleBindings::class)->console($object,$callback,$container);
113
+        $this->resolve(ConsoleBindings::class)->console($object, $callback, $container);
114 114
 
115 115
         //The console application must always return the kernel method.
116 116
         return $this->kernel();
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
      * @throws \DI\DependencyException
126 126
      * @throws \DI\NotFoundException
127 127
      */
128
-    private function consoleKernelObjectChecker($object,$callback,$container=false)
128
+    private function consoleKernelObjectChecker($object, $callback, $container = false)
129 129
     {
130 130
         //we check whether the callback value is a callable function.
131 131
         $isCallableForCallback = is_callable($callback);
@@ -133,10 +133,10 @@  discard block
 block discarded – undo
133 133
         //If the console object returns true,
134 134
         //we do not cancel binding operations
135 135
         //We are getting what applies to console with consoleKernelObject.
136
-        if($this->console() AND $isCallableForCallback) return $this->consoleKernelObject($object,$callback,$container);
136
+        if ($this->console() AND $isCallableForCallback) return $this->consoleKernelObject($object, $callback, $container);
137 137
 
138 138
         //If the application is not a console operation, we re-bind to existing methods synchronously.
139
-        return ($container) ? $this->containerBuild($object,$callback,true) : $this->build($object,$callback,true);
139
+        return ($container) ? $this->containerBuild($object, $callback, true) : $this->build($object, $callback, true);
140 140
     }
141 141
 
142 142
     /**
@@ -146,11 +146,11 @@  discard block
 block discarded – undo
146 146
      * @throws \DI\DependencyException
147 147
      * @throws \DI\NotFoundException
148 148
      */
149
-    private function consoleShared($object,$callback)
149
+    private function consoleShared($object, $callback)
150 150
     {
151 151
         //The console share is evaluated as a true variable to be assigned as the 3rd parameter in the classes to be bound.
152 152
         //The work to be done here is to bind the classes to be included in the console share privately.
153
-        $this->kernelAssigner()->consoleShared($object,$callback);
153
+        $this->kernelAssigner()->consoleShared($object, $callback);
154 154
     }
155 155
 
156 156
     /**
@@ -162,12 +162,12 @@  discard block
 block discarded – undo
162 162
      * @throws \DI\DependencyException
163 163
      * @throws \DI\NotFoundException
164 164
      */
165
-    public function containerBuild($object,$callback,$sync=false)
165
+    public function containerBuild($object, $callback, $sync = false)
166 166
     {
167 167
         //If the console object returns true,
168 168
         //we do not cancel binding operations
169 169
         //We are getting what applies to console with consoleKernelObject.
170
-        if($sync===false) return $this->consoleKernelObjectChecker($object,$callback,true);
170
+        if ($sync===false) return $this->consoleKernelObjectChecker($object, $callback, true);
171 171
 
172 172
         //Since the objects that come to the build method are objects from the container method,
173 173
         //we need to automatically create a kernel object named serviceContainer in this method.
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
 
176 176
         //the value corresponding to the bind value for the global object is assigned and
177 177
         //the resolve method is called for the dependency method.
178
-        $this->kernelAssigner()->setKernelObject($object,$callback,'serviceContainer');
178
+        $this->kernelAssigner()->setKernelObject($object, $callback, 'serviceContainer');
179 179
 
180 180
         //return kernel object
181 181
         return $this->kernel();
@@ -185,11 +185,11 @@  discard block
 block discarded – undo
185 185
      * @param $class
186 186
      * @param $bind
187 187
      */
188
-    private function contextualBindCleaner($class,$bind)
188
+    private function contextualBindCleaner($class, $bind)
189 189
     {
190 190
         //the context bind objects are checked again and the bind sequence submitted by
191 191
         //the user is checked and forced to re-instantiate the object.
192
-        if(isset(self::$instance[$class]) && self::$bindParams[$class]!==$bind){
192
+        if (isset(self::$instance[$class]) && self::$bindParams[$class]!==$bind) {
193 193
             unset(self::$instance[$class]);
194 194
             unset(self::$bindParams[$class]);
195 195
         }
@@ -208,11 +208,11 @@  discard block
 block discarded – undo
208 208
 
209 209
         // the has method can have a dotted string value so
210 210
         // we need to be able to control the string or array within the container.
211
-        foreach (explode(".",$abstract) as $item){
212
-            if(isset($container[$item])){
211
+        foreach (explode(".", $abstract) as $item) {
212
+            if (isset($container[$item])) {
213 213
                 $container = $container[$item];
214 214
             }
215
-            else{
215
+            else {
216 216
                 return null;
217 217
             }
218 218
         }
@@ -235,11 +235,11 @@  discard block
 block discarded – undo
235 235
 
236 236
         // the has method can have a dotted string value so
237 237
         // we need to be able to control the string or array within the container.
238
-        foreach (explode(".",$abstract) as $item){
238
+        foreach (explode(".", $abstract) as $item) {
239 239
 
240 240
             // this blog will work
241 241
             // if the data in the container loop points to an array.
242
-            if(!is_array($container)){
242
+            if (!is_array($container)) {
243 243
 
244 244
                 // we are querying the value of
245 245
                 // the items corresponding to the dotted value in the container.
@@ -247,7 +247,7 @@  discard block
 block discarded – undo
247 247
                 $container = $container[$item];
248 248
                 $bools[] = is_null($container) ? false : true;
249 249
             }
250
-            else{
250
+            else {
251 251
 
252 252
                 // if the container array corresponds to a string,
253 253
                 // the bools array is filled with the isset control directly.
@@ -257,7 +257,7 @@  discard block
 block discarded – undo
257 257
 
258 258
         // the method returns false if the bools sequence is false,
259 259
         // otherwise it will return true.
260
-        return in_array(false,$bools) ? false : true;
260
+        return in_array(false, $bools) ? false : true;
261 261
     }
262 262
 
263 263
     /**
@@ -307,7 +307,7 @@  discard block
 block discarded – undo
307 307
      * @throws \DI\DependencyException
308 308
      * @throws \DI\NotFoundException
309 309
      */
310
-    public function make($object=null,$callback=null,$container=false)
310
+    public function make($object = null, $callback = null, $container = false)
311 311
     {
312 312
         //we check whether the boolean value of the singleton variable used
313 313
         //for booting does not reset every time the object variable to be assigned to the kernel variable is true
@@ -315,8 +315,8 @@  discard block
 block discarded – undo
315 315
 
316 316
         //The console share is evaluated as a true variable to be assigned as the 3rd parameter in the classes to be bound.
317 317
         //The work to be done here is to bind the classes to be included in the console share privately.
318
-        if($container){
319
-            $this->consoleShared($object,$callback);
318
+        if ($container) {
319
+            $this->consoleShared($object, $callback);
320 320
         }
321 321
 
322 322
         //If the third parameter passed to the bind method carries a container value,
@@ -326,7 +326,7 @@  discard block
 block discarded – undo
326 326
         //If the bind method does not have parameters object and callback, the value is directly assigned to the kernel object.
327 327
         //Otherwise, when the bind object and callback are sent, the closure class inherits
328 328
         //the applicationProvider object and the resolve method is called
329
-        return ($object===null) ? $this->kernel() : $this->{$makeBuild}($object,$callback);
329
+        return ($object===null) ? $this->kernel() : $this->{$makeBuild}($object, $callback);
330 330
     }
331 331
 
332 332
     /**
@@ -365,7 +365,7 @@  discard block
 block discarded – undo
365 365
      * @param null $concrete
366 366
      * @return bool|mixed
367 367
      */
368
-    public function register($key,$object,$concrete=null)
368
+    public function register($key, $object, $concrete = null)
369 369
     {
370 370
         // we assign the values ​​required
371 371
         // for register to the global value variable.
@@ -375,7 +375,7 @@  discard block
 block discarded – undo
375 375
 
376 376
         // If there is an instance of the application class,
377 377
         // the register method is saved both in this example and in the global.
378
-        if(defined('appInstance')){
378
+        if (defined('appInstance')) {
379 379
 
380 380
             // where we will assign both the global instance
381 381
             // and the registered application object.
@@ -394,19 +394,19 @@  discard block
 block discarded – undo
394 394
      * @param bool $withConcrete
395 395
      * @return bool
396 396
      */
397
-    private function registerProcess($instance,$withConcrete=false)
397
+    private function registerProcess($instance, $withConcrete = false)
398 398
     {
399 399
         // values recorded without concrete.
400 400
         // or values deleted
401
-        if(false===$withConcrete){
401
+        if (false===$withConcrete) {
402 402
 
403 403
             //values registered without concrete
404
-            $instance->{$this->values['key']}=$this->values['object'];
404
+            $instance->{$this->values['key']} = $this->values['object'];
405 405
             return false;
406 406
         }
407 407
 
408 408
         //values registered with concrete
409
-        $instance->{$this->values['key']}[$this->values['object']]=$this->values['concrete'];
409
+        $instance->{$this->values['key']}[$this->values['object']] = $this->values['concrete'];
410 410
     }
411 411
 
412 412
     /**
@@ -417,22 +417,22 @@  discard block
 block discarded – undo
417 417
      * @throws \DI\DependencyException
418 418
      * @throws \DI\NotFoundException
419 419
      */
420
-    public function resolve($class,$bind=array())
420
+    public function resolve($class, $bind = array())
421 421
     {
422 422
         //the context bind objects are checked again and the bind sequence submitted by
423 423
         //the user is checked and forced to re-instantiate the object.
424
-        $this->contextualBindCleaner($class,$bind);
424
+        $this->contextualBindCleaner($class, $bind);
425 425
 
426 426
         //We do an instance check to get the static instance values of
427 427
         //the classes to be resolved with the make bind method.
428
-        if(!isset(self::$instance[$class])){
428
+        if (!isset(self::$instance[$class])) {
429 429
 
430 430
             //bind params object
431
-            self::$bindParams[$class]=$bind;
431
+            self::$bindParams[$class] = $bind;
432 432
 
433 433
             //By singleton checking, we solve the dependency injection of the given class.
434 434
             //Thus, each class can be called together with its dependency.
435
-            self::$instance[$class] = DIContainerManager::make($class,$this->applicationProviderBinding($this,self::$bindParams[$class]));
435
+            self::$instance[$class] = DIContainerManager::make($class, $this->applicationProviderBinding($this, self::$bindParams[$class]));
436 436
             $this->singleton()->resolved[$class] = self::$instance[$class];
437 437
 
438 438
             //return resolve class
@@ -450,9 +450,9 @@  discard block
 block discarded – undo
450 450
      * @param $class
451 451
      * @return mixed
452 452
      */
453
-    public function resolved($class){
453
+    public function resolved($class) {
454 454
 
455
-        if(isset($this['resolved'][$class])){
455
+        if (isset($this['resolved'][$class])) {
456 456
             return $this['resolved'][$class];
457 457
         }
458 458
 
@@ -467,7 +467,7 @@  discard block
 block discarded – undo
467 467
      * @throws \DI\DependencyException
468 468
      * @throws \DI\NotFoundException
469 469
      */
470
-    public function share($object=null,$callback=null)
470
+    public function share($object = null, $callback = null)
471 471
     {
472 472
         //we check whether the boolean value of the singleton variable used
473 473
         //for booting does not reset every time the object variable to be assigned to the kernel variable is true
@@ -475,12 +475,12 @@  discard block
 block discarded – undo
475 475
 
476 476
         //The console share is evaluated as a true variable to be assigned as the 3rd parameter in the classes to be bound.
477 477
         //The work to be done here is to bind the classes to be included in the console share privately.
478
-        $this->consoleShared($object,$callback);
478
+        $this->consoleShared($object, $callback);
479 479
 
480 480
         //If the bind method does not have parameters object and callback, the value is directly assigned to the kernel object.
481 481
         //Otherwise, when the bind object and callback are sent, the closure class inherits
482 482
         //the applicationProvider object and the resolve method is called
483
-        return ($object===null) ? $this->kernel() : $this->build($object,$callback);
483
+        return ($object===null) ? $this->kernel() : $this->build($object, $callback);
484 484
 
485 485
     }
486 486
 
@@ -500,7 +500,7 @@  discard block
 block discarded – undo
500 500
      */
501 501
     public function singleton()
502 502
     {
503
-        if($this->singleton===false){
503
+        if ($this->singleton===false) {
504 504
 
505 505
             //after first initializing, the singleton variable is set to true,
506 506
             //and subsequent incoming classes can inherit the loaded object.
@@ -521,12 +521,12 @@  discard block
 block discarded – undo
521 521
         // for application instance
522 522
         // if the values ​​to be saved are to be saved without the concrete,
523 523
         // if it is an array.
524
-        if($this->values['concrete']===null) {
524
+        if ($this->values['concrete']===null) {
525 525
 
526 526
             // Without concrete,
527 527
             // the saved value will be saved
528 528
             // if the it does not exist in application instance.
529
-            if(!isset($instance->{$this->values['key']})) {
529
+            if (!isset($instance->{$this->values['key']})) {
530 530
                 $this->registerProcess($instance);
531 531
             }
532 532
             return false;
@@ -534,7 +534,7 @@  discard block
 block discarded – undo
534 534
 
535 535
         // We send concrete values to be recorded with concrete as true.
536 536
         // these values will be recorded as a array.
537
-        $this->registerProcess($instance,true);
537
+        $this->registerProcess($instance, true);
538 538
     }
539 539
 
540 540
     /**
@@ -543,11 +543,11 @@  discard block
 block discarded – undo
543 543
      * @param null $object
544 544
      * @return mixed
545 545
      */
546
-    public function terminate($key,$object=null)
546
+    public function terminate($key, $object = null)
547 547
     {
548 548
         // object null is
549 549
         // sent to just terminate a key.
550
-        if($object===null){
550
+        if ($object===null) {
551 551
             unset(core()->{$key});
552 552
             return false;
553 553
         }
Please login to merge, or discard this patch.
src/resta/Container/ContainerInstanceResolver.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -30,20 +30,20 @@
 block discarded – undo
30 30
      * @param null|string $name
31 31
      * @return array
32 32
      */
33
-    public function container($name=null)
33
+    public function container($name = null)
34 34
     {
35 35
         //check container value for kernel
36
-        if(isset($this->kernel->kernel)){
36
+        if (isset($this->kernel->kernel)) {
37 37
 
38 38
             // if methoda is a null parameter,
39 39
             // then we send direct container values.
40
-            if(is_null($name)){
40
+            if (is_null($name)) {
41 41
                 return (array)$this->kernel->kernel;
42 42
             }
43 43
 
44 44
             // if there is an existing value in the container as the method parameter,
45 45
             // we send this value directly in the container.
46
-            if(isset($this->container()[$name])){
46
+            if (isset($this->container()[$name])) {
47 47
                 return $this->container()[$name];
48 48
             }
49 49
         }
Please login to merge, or discard this patch.