Completed
Push — master ( 4160d6...bd895c )
by Mathieu
03:51
created
src/Charcoal/App/AbstractManager.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -19,18 +19,18 @@
 block discarded – undo
19 19
     use LoggerAwareTrait;
20 20
 
21 21
     /**
22
-    * @var array
23
-    */
22
+     * @var array
23
+     */
24 24
     private $config = [];
25 25
 
26 26
     /**
27
-    * @var SlimApp
28
-    */
27
+     * @var SlimApp
28
+     */
29 29
     private $app;
30 30
 
31 31
     /**
32
-    * @param array $data The dependencies container
33
-    */
32
+     * @param array $data The dependencies container
33
+     */
34 34
     public function __construct(array $data)
35 35
     {
36 36
         $this->set_config($data['config']);
Please login to merge, or discard this patch.
src/Charcoal/App/Action/AbstractAction.php 1 patch
Indentation   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -20,19 +20,19 @@  discard block
 block discarded – undo
20 20
     const DEFAULT_MODE = self::MODE_REDIRECT;
21 21
 
22 22
     /**
23
-    * @var string $mode
24
-    */
23
+     * @var string $mode
24
+     */
25 25
     private $mode = self::DEFAULT_MODE;
26 26
 
27 27
     /**
28
-    * @var boolean $success
29
-    */
28
+     * @var boolean $success
29
+     */
30 30
     private $success = false;
31 31
 
32 32
     /**
33
-    * @param array $data
34
-    * @return AbstractAction Chainable
35
-    */
33
+     * @param array $data
34
+     * @return AbstractAction Chainable
35
+     */
36 36
     public function set_data(array $data)
37 37
     {
38 38
         foreach ($data as $prop => $val) {
@@ -53,10 +53,10 @@  discard block
 block discarded – undo
53 53
     }
54 54
 
55 55
     /**
56
-    * @param string $mode
57
-    * @throws InvalidArgumentException if mode is not a string
58
-    * @return ActionInterface Chainable
59
-    */
56
+     * @param string $mode
57
+     * @throws InvalidArgumentException if mode is not a string
58
+     * @return ActionInterface Chainable
59
+     */
60 60
     public function set_mode($mode)
61 61
     {
62 62
         if (!is_string($mode)) {
@@ -69,18 +69,18 @@  discard block
 block discarded – undo
69 69
     }
70 70
 
71 71
     /**
72
-    * @return string
73
-    */
72
+     * @return string
73
+     */
74 74
     public function mode()
75 75
     {
76 76
         return $this->mode;
77 77
     }
78 78
 
79 79
     /**
80
-    * @param bool $success
81
-    * @throws InvalidArgumentException if success is not a boolean
82
-    * @return ActionInterface Chainable
83
-    */
80
+     * @param bool $success
81
+     * @throws InvalidArgumentException if success is not a boolean
82
+     * @return ActionInterface Chainable
83
+     */
84 84
     public function set_success($success)
85 85
     {
86 86
         if (!is_bool($success)) {
@@ -93,15 +93,15 @@  discard block
 block discarded – undo
93 93
     }
94 94
 
95 95
     /**
96
-    * @return bool
97
-    */
96
+     * @return bool
97
+     */
98 98
     public function success()
99 99
     {
100 100
         return $this->success;
101 101
     }
102 102
 
103 103
     /**
104
-    * @return string
105
-    */
104
+     * @return string
105
+     */
106 106
     abstract public function response();
107 107
 }
Please login to merge, or discard this patch.
src/Charcoal/App/Action/ActionInterface.php 1 patch
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -6,29 +6,29 @@
 block discarded – undo
6 6
 {
7 7
 
8 8
     /**
9
-    * @param string $mode
10
-    * @return ActionInterface Chainable
11
-    */
9
+     * @param string $mode
10
+     * @return ActionInterface Chainable
11
+     */
12 12
     public function set_mode($mode);
13 13
 
14 14
     /**
15
-    * @return string
16
-    */
15
+     * @return string
16
+     */
17 17
     public function mode();
18 18
 
19 19
     /**
20
-    * @param boolean $success
21
-    * @return ActionInterface Chainable
22
-    */
20
+     * @param boolean $success
21
+     * @return ActionInterface Chainable
22
+     */
23 23
     public function set_success($success);
24 24
 
25 25
     /**
26
-    * @return boolean
27
-    */
26
+     * @return boolean
27
+     */
28 28
     public function success();
29 29
 
30 30
     /**
31
-    * @return array
32
-    */
31
+     * @return array
32
+     */
33 33
     public function response();
34 34
 }
Please login to merge, or discard this patch.
src/Charcoal/App/App.php 2 patches
Indentation   +48 added lines, -48 removed lines patch added patch discarded remove patch
@@ -45,36 +45,36 @@  discard block
 block discarded – undo
45 45
     use ConfigurableTrait;
46 46
 
47 47
     /**
48
-    * @var SlimApp $app
49
-    */
48
+     * @var SlimApp $app
49
+     */
50 50
     private $app;
51 51
 
52 52
     /**
53
-    * @var ModuleManager
54
-    */
53
+     * @var ModuleManager
54
+     */
55 55
     private $module_manager;
56 56
 
57 57
     /**
58
-    * @var RouteManager
59
-    */
58
+     * @var RouteManager
59
+     */
60 60
     private $route_manager;
61 61
 
62 62
     /**
63
-    * @var MiddlewareManager
64
-    */
63
+     * @var MiddlewareManager
64
+     */
65 65
     private $middleware_manager;
66 66
 
67 67
     /**
68
-    * @var LanguageManager
69
-    */
68
+     * @var LanguageManager
69
+     */
70 70
     private $language_manager;
71 71
 
72 72
     /**
73
-    * # Required dependencies
74
-    * - `logger` A PSR-3 logger.
75
-    *
76
-    * @param array $data
77
-    */
73
+     * # Required dependencies
74
+     * - `logger` A PSR-3 logger.
75
+     *
76
+     * @param array $data
77
+     */
78 78
     public function __construct(array $data)
79 79
     {
80 80
         $this->set_logger($data['app']->logger);
@@ -85,9 +85,9 @@  discard block
 block discarded – undo
85 85
     }
86 86
 
87 87
     /**
88
-    * @param SlimApp $app
89
-    * @return App Chainable
90
-    */
88
+     * @param SlimApp $app
89
+     * @return App Chainable
90
+     */
91 91
     public function set_app(SlimApp $app)
92 92
     {
93 93
         $this->app = $app;
@@ -95,8 +95,8 @@  discard block
 block discarded – undo
95 95
     }
96 96
 
97 97
         /**
98
-    * @return ModuleManager
99
-    */
98
+         * @return ModuleManager
99
+         */
100 100
     public function module_manager()
101 101
     {
102 102
         if ($this->module_manager == null) {
@@ -112,8 +112,8 @@  discard block
 block discarded – undo
112 112
     }
113 113
 
114 114
     /**
115
-    * @return RouteManager
116
-    */
115
+     * @return RouteManager
116
+     */
117 117
     public function route_manager()
118 118
     {
119 119
         if ($this->route_manager === null) {
@@ -129,8 +129,8 @@  discard block
 block discarded – undo
129 129
     }
130 130
 
131 131
     /**
132
-    * @return MiddlewareManager
133
-    */
132
+     * @return MiddlewareManager
133
+     */
134 134
     public function middleware_manager()
135 135
     {
136 136
         if ($this->middleware_manager === null) {
@@ -146,8 +146,8 @@  discard block
 block discarded – undo
146 146
     }
147 147
 
148 148
     /**
149
-    * @return LanguageManager
150
-    */
149
+     * @return LanguageManager
150
+     */
151 151
     public function language_manager()
152 152
     {
153 153
         if (!isset($this->language_manager)) {
@@ -174,8 +174,8 @@  discard block
 block discarded – undo
174 174
     }
175 175
 
176 176
     /**
177
-    * @return App Chainable
178
-    */
177
+     * @return App Chainable
178
+     */
179 179
     public function setup()
180 180
     {
181 181
         $this->setup_languages();
@@ -187,8 +187,8 @@  discard block
 block discarded – undo
187 187
     }
188 188
 
189 189
     /**
190
-    * @return void
191
-    */
190
+     * @return void
191
+     */
192 192
     protected function setup_languages()
193 193
     {
194 194
         $language_manager = $this->language_manager();
@@ -196,8 +196,8 @@  discard block
 block discarded – undo
196 196
     }
197 197
 
198 198
     /**
199
-    * @return void
200
-    */
199
+     * @return void
200
+     */
201 201
     protected function setup_middlewares()
202 202
     {
203 203
         $middleware_manager = $this->middleware_manager();
@@ -205,10 +205,10 @@  discard block
 block discarded – undo
205 205
     }
206 206
 
207 207
     /**
208
-    * Set up the app's "global" routes, via a RouteManager
209
-    *
210
-    * @return void
211
-    */
208
+     * Set up the app's "global" routes, via a RouteManager
209
+     *
210
+     * @return void
211
+     */
212 212
     protected function setup_routes()
213 213
     {
214 214
         $route_manager = $this->route_manager();
@@ -216,11 +216,11 @@  discard block
 block discarded – undo
216 216
     }
217 217
 
218 218
     /**
219
-    * Set up the app's "global" routables.
220
-    * Routables can only be defined globally (app-level) for now.
221
-    *
222
-    * @return void
223
-    */
219
+     * Set up the app's "global" routables.
220
+     * Routables can only be defined globally (app-level) for now.
221
+     *
222
+     * @return void
223
+     */
224 224
     protected function setup_routables()
225 225
     {
226 226
         $charcoal = $this;
@@ -252,8 +252,8 @@  discard block
 block discarded – undo
252 252
     }
253 253
 
254 254
     /**
255
-    * @return void
256
-    */
255
+     * @return void
256
+     */
257 257
     protected function setup_modules()
258 258
     {
259 259
         $module_manager = $this->module_manager();
@@ -261,11 +261,11 @@  discard block
 block discarded – undo
261 261
     }
262 262
 
263 263
     /**
264
-    * ConfigurableTrait > create_config()
265
-    *
266
-    * @param array $data
267
-    * @return AppConfig
268
-    */
264
+     * ConfigurableTrait > create_config()
265
+     *
266
+     * @param array $data
267
+     * @return AppConfig
268
+     */
269 269
     public function create_config(array $data = null)
270 270
     {
271 271
         return new AppConfig($data);
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
     {
102 102
         if ($this->module_manager == null) {
103 103
             $config  = $this->config();
104
-            $modules = (isset($config['modules']) ? $config['modules'] : [] );
104
+            $modules = (isset($config['modules']) ? $config['modules'] : []);
105 105
             $this->module_manager = new ModuleManager([
106 106
                 'config' => $modules,
107 107
                 'app'    => $this->app,
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
     {
119 119
         if ($this->route_manager === null) {
120 120
             $config = $this->config();
121
-            $routes = (isset($config['routes']) ? $config['routes'] : [] );
121
+            $routes = (isset($config['routes']) ? $config['routes'] : []);
122 122
             $route_manager = new RouteManager([
123 123
                 'config' => $routes,
124 124
                 'app'    => $this->app,
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
     {
136 136
         if ($this->middleware_manager === null) {
137 137
             $config = $this->config();
138
-            $middlewares = (isset($config['middlewares']) ? $config['middlewares'] : [] );
138
+            $middlewares = (isset($config['middlewares']) ? $config['middlewares'] : []);
139 139
             $middleware_manager = new MiddlewareManager([
140 140
                 'config' => $middlewares,
141 141
                 'app'    => $this->app,
@@ -227,7 +227,7 @@  discard block
 block discarded – undo
227 227
         // For now, need to rely on a catch-all...
228 228
         $this->app->get(
229 229
             '{catchall:.*}',
230
-            function (
230
+            function(
231 231
                 RequestInterface $request,
232 232
                 ResponseInterface $response,
233 233
                 $args
Please login to merge, or discard this patch.
src/Charcoal/App/Middleware/MiddlewareManager.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -10,8 +10,8 @@
 block discarded – undo
10 10
 class MiddlewareManager extends AbstractManager
11 11
 {
12 12
     /**
13
-    * Set up the middlewares
14
-    */
13
+     * Set up the middlewares
14
+     */
15 15
     public function setup_middlewares()
16 16
     {
17 17
         // ...
Please login to merge, or discard this patch.
src/Charcoal/App/Module/AbstractModule.php 1 patch
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -27,8 +27,8 @@  discard block
 block discarded – undo
27 27
     
28 28
     // ...
29 29
     /**
30
-    * @return void
31
-    */
30
+     * @return void
31
+     */
32 32
     public function setup()
33 33
     {
34 34
         $this->setup_middlewares();
@@ -36,8 +36,8 @@  discard block
 block discarded – undo
36 36
     }
37 37
 
38 38
     /**
39
-    * @return void
40
-    */
39
+     * @return void
40
+     */
41 41
     protected function setup_middlewares()
42 42
     {
43 43
         $middlewares = $this->config['middlewares'];
@@ -53,10 +53,10 @@  discard block
 block discarded – undo
53 53
 
54 54
 
55 55
     /**
56
-    * Set up the app's "global" routes, via a RouteManager
57
-    *
58
-    * @return void
59
-    */
56
+     * Set up the app's "global" routes, via a RouteManager
57
+     *
58
+     * @return void
59
+     */
60 60
     protected function setup_routes()
61 61
     {
62 62
         $routes = $this->config['routes'];
Please login to merge, or discard this patch.
src/Charcoal/App/Module/ModuleInterface.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@
 block discarded – undo
5 5
 interface ModuleInterface
6 6
 {
7 7
     /**
8
-    * @return void
9
-    */
8
+     * @return void
9
+     */
10 10
     public function setup();
11 11
 }
Please login to merge, or discard this patch.
src/Charcoal/App/Module/ModuleManager.php 1 patch
Indentation   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -8,19 +8,19 @@  discard block
 block discarded – undo
8 8
 class ModuleManager extends AbstractManager
9 9
 {
10 10
     /**
11
-    * @var array $modules
12
-    */
11
+     * @var array $modules
12
+     */
13 13
     private $modules = [];
14 14
 
15 15
     /**
16
-    * @var \Slim\App $app
17
-    */
16
+     * @var \Slim\App $app
17
+     */
18 18
     private $app;
19 19
 
20 20
     /**
21
-    * @param array $modules
22
-    * @return ModuleManager Chainable
23
-    */
21
+     * @param array $modules
22
+     * @return ModuleManager Chainable
23
+     */
24 24
     public function set_modules(array $modules)
25 25
     {
26 26
         foreach ($modules as $module_ident => $module_config) {
@@ -30,10 +30,10 @@  discard block
 block discarded – undo
30 30
     }
31 31
 
32 32
     /**
33
-    * @param string $module_ident
34
-    * @param array|ConfigInterface $module_config
35
-    * @return ModuleManager Chainable
36
-    */
33
+     * @param string $module_ident
34
+     * @param array|ConfigInterface $module_config
35
+     * @return ModuleManager Chainable
36
+     */
37 37
     public function add_module($module_ident, $module_config)
38 38
     {
39 39
         $this->modules[$module_ident] = $module_config;
@@ -41,8 +41,8 @@  discard block
 block discarded – undo
41 41
     }
42 42
 
43 43
     /**
44
-    * @return void
45
-    */
44
+     * @return void
45
+     */
46 46
     public function setup_modules()
47 47
     {
48 48
         $modules = $this->config();
Please login to merge, or discard this patch.
src/Charcoal/App/Routable/RoutableFactory.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -11,8 +11,8 @@
 block discarded – undo
11 11
 class RoutableFactory extends ResolverFactory
12 12
 {
13 13
     /**
14
-    * @param array $data
15
-    */
14
+     * @param array $data
15
+     */
16 16
     public function base_class()
17 17
     {
18 18
         return '\Charcoal\App\Routable\RoutableInterface';
Please login to merge, or discard this patch.
Doc Comments   -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,6 @@
 block discarded – undo
11 11
 class WidgetFactory extends ResolverFactory
12 12
 {
13 13
     /**
14
-    * @param array $data
15 14
     */
16 15
     public function base_class()
17 16
     {
Please login to merge, or discard this patch.