Completed
Push — master ( 3ab6e3...8e1449 )
by Thierry
01:54
created
src/Utils/Container.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -201,7 +201,7 @@
 block discarded – undo
201 201
     /**
202 202
      * Create a new the config manager
203 203
      *
204
-     * @return Jaxon\Utils\Config\Config            The config manager
204
+     * @return Config\Config            The config manager
205 205
      */
206 206
     public function newConfig()
207 207
     {
Please login to merge, or discard this patch.
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
 
28 28
     public static function getInstance()
29 29
     {
30
-        if(!self::$xInstance)
30
+        if (!self::$xInstance)
31 31
         {
32 32
             self::$xInstance = new Container();
33 33
         }
@@ -65,19 +65,19 @@  discard block
 block discarded – undo
65 65
          * Managers
66 66
          */
67 67
         // Plugin Manager
68
-        $this->di['plugin_manager'] = function ($c) {
68
+        $this->di['plugin_manager'] = function($c) {
69 69
             return new \Jaxon\Plugin\Manager();
70 70
         };
71 71
         // Request Manager
72
-        $this->di['request_manager'] = function ($c) {
72
+        $this->di['request_manager'] = function($c) {
73 73
             return new \Jaxon\Request\Manager();
74 74
         };
75 75
         // Request Factory
76
-        $this->di['request_factory'] = function ($c) {
76
+        $this->di['request_factory'] = function($c) {
77 77
             return new \Jaxon\Request\Factory();
78 78
         };
79 79
         // Response Manager
80
-        $this->di['response_manager'] = function ($c) {
80
+        $this->di['response_manager'] = function($c) {
81 81
             return new \Jaxon\Response\Manager();
82 82
         };
83 83
 
@@ -85,35 +85,35 @@  discard block
 block discarded – undo
85 85
          * Services
86 86
          */
87 87
         // Config manager
88
-        $this->di['config'] = function ($c) {
88
+        $this->di['config'] = function($c) {
89 89
             return new Config\Config();
90 90
         };
91 91
         // Minifier
92
-        $this->di['minifier'] = function ($c) {
92
+        $this->di['minifier'] = function($c) {
93 93
             return new Template\Minifier();
94 94
         };
95 95
         // Translator
96
-        $this->di['translator'] = function ($c) {
96
+        $this->di['translator'] = function($c) {
97 97
             return new Translation\Translator($c['translation_dir'], $c['config']);
98 98
         };
99 99
         // Template engine
100
-        $this->di['template'] = function ($c) {
100
+        $this->di['template'] = function($c) {
101 101
             return new Template\Template($c['template_dir']);
102 102
         };
103 103
         // Validator
104
-        $this->di['validator'] = function ($c) {
104
+        $this->di['validator'] = function($c) {
105 105
             return new Validation\Validator($c['translator'], $c['config']);
106 106
         };
107 107
         // Pagination Renderer
108
-        $this->di['pagination.renderer'] = function ($c) {
108
+        $this->di['pagination.renderer'] = function($c) {
109 109
             return new Pagination\Renderer();
110 110
         };
111 111
         // Pagination Paginator
112
-        $this->di['pagination.paginator'] = function ($c) {
112
+        $this->di['pagination.paginator'] = function($c) {
113 113
             return new Pagination\Paginator($c['pagination.renderer']);
114 114
         };
115 115
         // Event Dispatcher
116
-        $this->di['events'] = function ($c) {
116
+        $this->di['events'] = function($c) {
117 117
             return new EventDispatcher();
118 118
         };
119 119
 
@@ -121,15 +121,15 @@  discard block
 block discarded – undo
121 121
          * Core library objects
122 122
          */
123 123
         // Global Response
124
-        $this->di['response'] = function ($c) {
124
+        $this->di['response'] = function($c) {
125 125
             return new \Jaxon\Response\Response();
126 126
         };
127 127
         // Jaxon Core
128
-        $this->di['jaxon'] = function ($c) {
128
+        $this->di['jaxon'] = function($c) {
129 129
             return new \Jaxon\Jaxon();
130 130
         };
131 131
         // View Renderer Facade
132
-        $this->di['sentry.view.renderer'] = function ($c) {
132
+        $this->di['sentry.view.renderer'] = function($c) {
133 133
             $aRenderers = $c['view.data.renderers'];
134 134
             $sDefaultNamespace = $c['view.data.namespace.default'];
135 135
             return new \Jaxon\Sentry\View\Facade($aRenderers, $sDefaultNamespace);
@@ -391,14 +391,14 @@  discard block
 block discarded – undo
391 391
         $this->di['sentry.view.base.' . $sId] = $xClosure;
392 392
 
393 393
         // Return the initialized view renderer
394
-        $this->di['sentry.view.' . $sId] = function ($c) use ($sId) {
394
+        $this->di['sentry.view.' . $sId] = function($c) use ($sId) {
395 395
             // Get the defined renderer
396 396
             $renderer = $c['sentry.view.base.' . $sId];
397 397
             // Init the renderer with the template namespaces
398 398
             $aNamespaces = $this->di['view.data.namespaces'];
399
-            if(key_exists($sId, $aNamespaces))
399
+            if (key_exists($sId, $aNamespaces))
400 400
             {
401
-                foreach($aNamespaces[$sId] as $ns)
401
+                foreach ($aNamespaces[$sId] as $ns)
402 402
                 {
403 403
                     $renderer->addNamespace($ns['namespace'], $ns['directory'], $ns['extension']);
404 404
                 }
@@ -416,7 +416,7 @@  discard block
 block discarded – undo
416 416
      */
417 417
     public function getViewRenderer($sId = '')
418 418
     {
419
-        if(!$sId)
419
+        if (!$sId)
420 420
         {
421 421
             // Return the view renderer facade
422 422
             return $this->di['sentry.view.renderer'];
Please login to merge, or discard this patch.
src/Traits/Autoload.php 1 patch
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -19,8 +19,6 @@
 block discarded – undo
19 19
 
20 20
 namespace Jaxon\Traits;
21 21
 
22
-use Jaxon\Utils\Container;
23
-
24 22
 trait Autoload
25 23
 {
26 24
     /**
Please login to merge, or discard this patch.
src/Traits/Plugin.php 1 patch
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -19,8 +19,6 @@
 block discarded – undo
19 19
 
20 20
 namespace Jaxon\Traits;
21 21
 
22
-use Jaxon\Utils\Container;
23
-
24 22
 trait Plugin
25 23
 {
26 24
     /**
Please login to merge, or discard this patch.
src/Jaxon.php 1 patch
Unused Use Statements   -5 removed lines patch added patch discarded remove patch
@@ -25,14 +25,9 @@
 block discarded – undo
25 25
 
26 26
 namespace Jaxon;
27 27
 
28
-use Jaxon\Plugin\Manager as PluginManager;
29
-use Jaxon\Request\Manager as RequestManager;
30
-use Jaxon\Response\Manager as ResponseManager;
31
-
32 28
 use Jaxon\Utils\URI;
33 29
 use Jaxon\Utils\Container;
34 30
 use Exception;
35
-use Closure;
36 31
 
37 32
 class Jaxon
38 33
 {
Please login to merge, or discard this patch.