Completed
Pull Request — master (#3)
by Chauncey
11:17
created
src/Charcoal/View/Mustache/MustacheLoader.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
      */
25 25
     protected function filenameFromIdent($ident)
26 26
     {
27
-        $filename  = str_replace([ '\\' ], '.', $ident);
27
+        $filename  = str_replace(['\\'], '.', $ident);
28 28
         $filename .= '.mustache';
29 29
 
30 30
         return $filename;
Please login to merge, or discard this patch.
src/Charcoal/View/Php/PhpLoader.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@
 block discarded – undo
19 19
      */
20 20
     protected function filenameFromIdent($ident)
21 21
     {
22
-        $filename = str_replace([ '\\' ], '.', $ident);
22
+        $filename = str_replace(['\\'], '.', $ident);
23 23
         $filename .= '.php';
24 24
 
25 25
         return $filename;
Please login to merge, or discard this patch.
src/Charcoal/View/Twig/TwigLoader.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@
 block discarded – undo
26 26
      */
27 27
     protected function filenameFromIdent($ident)
28 28
     {
29
-        $filename = str_replace([ '\\' ], '.', $ident);
29
+        $filename = str_replace(['\\'], '.', $ident);
30 30
         $filename .= '.twig';
31 31
 
32 32
         return $filename;
Please login to merge, or discard this patch.
src/Charcoal/View/Mustache/TranslatorHelpers.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -111,7 +111,7 @@
 block discarded – undo
111 111
                     $this->number = $helper->render('{{ '.$this->number.' }}');
112 112
                 }
113 113
 
114
-                $text = $this->translator->transChoice($text, (int)$this->number, [], $this->domain, $this->locale);
114
+                $text = $this->translator->transChoice($text, (int) $this->number, [], $this->domain, $this->locale);
115 115
             }
116 116
 
117 117
             $this->reset();
Please login to merge, or discard this patch.
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -152,7 +152,7 @@
 block discarded – undo
152 152
      *
153 153
      * @param  string $macro A domain, locale, or number.
154 154
      * @throws LogicException If the macro is unresolved.
155
-     * @return mixed
155
+     * @return TranslatorHelpers
156 156
      */
157 157
     public function __get($macro)
158 158
     {
Please login to merge, or discard this patch.
src/Charcoal/View/ViewableTrait.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -79,7 +79,7 @@
 block discarded – undo
79 79
     /**
80 80
      * Set the renderable view.
81 81
      *
82
-     * @param ViewInterface|array $view The view instance to use to render.
82
+     * @param ViewInterface $view The view instance to use to render.
83 83
      * @throws InvalidArgumentException If the view parameter is not an array or a View object.
84 84
      * @return self
85 85
      */
Please login to merge, or discard this patch.
src/Charcoal/View/ViewServiceProvider.php 1 patch
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
          * @param  Container $container A container instance.
83 83
          * @return ViewConfig
84 84
          */
85
-        $container['view/config'] = function (Container $container) {
85
+        $container['view/config'] = function(Container $container) {
86 86
             $appConfig  = isset($container['config']) ? $container['config'] : [];
87 87
             $viewConfig = isset($appConfig['view']) ? $appConfig['view'] : null;
88 88
             $viewConfig = new ViewConfig($viewConfig);
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
          * @param Container $container A container instance.
123 123
          * @return array The view loader dependencies array.
124 124
          */
125
-        $container['view/loader/dependencies'] = function (Container $container) {
125
+        $container['view/loader/dependencies'] = function(Container $container) {
126 126
             return [
127 127
                 'logger'    => $container['logger'],
128 128
                 'base_path' => $container['config']['base_path'],
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
          * @param Container $container A container instance.
135 135
          * @return MustacheLoader
136 136
          */
137
-        $container['view/loader/mustache'] = function (Container $container) {
137
+        $container['view/loader/mustache'] = function(Container $container) {
138 138
             return new MustacheLoader($container['view/loader/dependencies']);
139 139
         };
140 140
 
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
          * @param Container $container A container instance.
143 143
          * @return PhpLoader
144 144
          */
145
-        $container['view/loader/php'] = function (Container $container) {
145
+        $container['view/loader/php'] = function(Container $container) {
146 146
             return new PhpLoader($container['view/loader/dependencies']);
147 147
         };
148 148
 
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
          * @param Container $container A container instance.
151 151
          * @return TwigLoader
152 152
          */
153
-        $container['view/loader/twig'] = function (Container $container) {
153
+        $container['view/loader/twig'] = function(Container $container) {
154 154
             return new TwigLoader($container['view/loader/dependencies']);
155 155
         };
156 156
     }
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
          * @param Container $container A container instance.
166 166
          * @return MustacheEngine
167 167
          */
168
-        $container['view/engine/mustache'] = function (Container $container) {
168
+        $container['view/engine/mustache'] = function(Container $container) {
169 169
             return new MustacheEngine([
170 170
                 'logger'    => $container['logger'],
171 171
                 'loader'    => $container['view/loader/mustache'],
@@ -178,7 +178,7 @@  discard block
 block discarded – undo
178 178
          * @param Container $container A container instance.
179 179
          * @return PhpEngine
180 180
          */
181
-        $container['view/engine/php'] = function (Container $container) {
181
+        $container['view/engine/php'] = function(Container $container) {
182 182
             return new PhpEngine([
183 183
                 'logger'    => $container['logger'],
184 184
                 'loader'    => $container['view/loader/php']
@@ -189,7 +189,7 @@  discard block
 block discarded – undo
189 189
          * @param Container $container A container instance.
190 190
          * @return TwigEngine
191 191
          */
192
-        $container['view/engine/twig'] = function (Container $container) {
192
+        $container['view/engine/twig'] = function(Container $container) {
193 193
             return new TwigEngine([
194 194
                 'logger'    => $container['logger'],
195 195
                 'loader'    => $container['view/loader/twig'],
@@ -203,7 +203,7 @@  discard block
 block discarded – undo
203 203
          * @param Container $container A container instance.
204 204
          * @return \Charcoal\View\EngineInterface
205 205
          */
206
-        $container['view/engine'] = function (Container $container) {
206
+        $container['view/engine'] = function(Container $container) {
207 207
             $viewConfig = $container['view/config'];
208 208
             $type = $viewConfig['default_engine'];
209 209
             return $container['view/engine/'.$type];
@@ -222,7 +222,7 @@  discard block
 block discarded – undo
222 222
          * @param Container $container A container instance.
223 223
          * @return string|null
224 224
          */
225
-        $container['view/mustache/cache'] = function (Container $container) {
225
+        $container['view/mustache/cache'] = function(Container $container) {
226 226
             $viewConfig = $container['view/config'];
227 227
             return $viewConfig['engines.mustache.cache'];
228 228
         };
@@ -235,7 +235,7 @@  discard block
 block discarded – undo
235 235
     protected function registerMustacheHelpersServices(Container $container)
236 236
     {
237 237
         if (!isset($container['view/mustache/helpers'])) {
238
-            $container['view/mustache/helpers'] = function () {
238
+            $container['view/mustache/helpers'] = function() {
239 239
                 return [];
240 240
             };
241 241
         }
@@ -245,7 +245,7 @@  discard block
 block discarded – undo
245 245
          *
246 246
          * @return AssetsHelpers
247 247
          */
248
-        $container['view/mustache/helpers/assets'] = function () {
248
+        $container['view/mustache/helpers/assets'] = function() {
249 249
             return new AssetsHelpers();
250 250
         };
251 251
 
@@ -254,7 +254,7 @@  discard block
 block discarded – undo
254 254
          *
255 255
          * @return TranslatorHelpers
256 256
          */
257
-        $container['view/mustache/helpers/translator'] = function (Container $container) {
257
+        $container['view/mustache/helpers/translator'] = function(Container $container) {
258 258
             return new TranslatorHelpers([
259 259
                 'translator' => $container['translator']
260 260
             ]);
@@ -265,7 +265,7 @@  discard block
 block discarded – undo
265 265
          *
266 266
          * @return MarkdownHelpers
267 267
          */
268
-        $container['view/mustache/helpers/markdown'] = function (Container $container) {
268
+        $container['view/mustache/helpers/markdown'] = function(Container $container) {
269 269
             return new MarkdownHelpers([
270 270
                 'parsedown' => $container['view/parsedown']
271 271
             ]);
@@ -278,7 +278,7 @@  discard block
 block discarded – undo
278 278
          * @param  Container $container A container instance.
279 279
          * @return array
280 280
          */
281
-        $container->extend('view/mustache/helpers', function (array $helpers, Container $container) {
281
+        $container->extend('view/mustache/helpers', function(array $helpers, Container $container) {
282 282
             return array_merge(
283 283
                 $helpers,
284 284
                 $container['view/mustache/helpers/assets']->toArray(),
@@ -298,7 +298,7 @@  discard block
 block discarded – undo
298 298
          * @param  Container $container A container instance.
299 299
          * @return string|null
300 300
          */
301
-        $container['view/twig/cache'] = function (Container $container) {
301
+        $container['view/twig/cache'] = function(Container $container) {
302 302
             $viewConfig = $container['view/config'];
303 303
             return $viewConfig['engines.twig.cache'];
304 304
         };
@@ -316,7 +316,7 @@  discard block
 block discarded – undo
316 316
          * @param Container $container A container instance.
317 317
          * @return ViewInterface
318 318
          */
319
-        $container['view'] = function (Container $container) {
319
+        $container['view'] = function(Container $container) {
320 320
             return new GenericView([
321 321
                 'logger' => $container['logger'],
322 322
                 'engine' => $container['view/engine']
@@ -329,7 +329,7 @@  discard block
 block discarded – undo
329 329
          * @param Container $container A container instance.
330 330
          * @return Renderer
331 331
          */
332
-        $container['view/renderer'] = function (Container $container) {
332
+        $container['view/renderer'] = function(Container $container) {
333 333
             return new Renderer([
334 334
                 'view' => $container['view']
335 335
             ]);
@@ -340,7 +340,7 @@  discard block
 block discarded – undo
340 340
          *
341 341
          * @return Parsedown
342 342
          */
343
-        $container['view/parsedown'] = function () {
343
+        $container['view/parsedown'] = function() {
344 344
             $parsedown = new Parsedown();
345 345
             $parsedown->setSafeMode(true);
346 346
             return $parsedown;
Please login to merge, or discard this patch.