Completed
Push — 1.x ( 549f51...b82b20 )
by Asao
02:04
created
src/Locator.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@
 block discarded – undo
33 33
 
34 34
     /**
35 35
      * @param string $file
36
-     * @return bool|string
36
+     * @return string|false
37 37
      */
38 38
     public function locate($file)
39 39
     {
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@
 block discarded – undo
37 37
      */
38 38
     public function locate($file)
39 39
     {
40
-        $file = substr($file,0,1) ==='/' ? substr($file,1) : $file;
40
+        $file = substr($file, 0, 1) === '/' ? substr($file, 1) : $file;
41 41
         foreach ($this->dirs as $system) {
42 42
             $location = $system . $file;
43 43
             if (file_exists($location)) {
Please login to merge, or discard this patch.
src/Section.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
      */
24 24
     public function start()
25 25
     {
26
-        $this->ob_level ++;
26
+        $this->ob_level++;
27 27
         ob_start();
28 28
     }
29 29
 
Please login to merge, or discard this patch.
src/Renderer.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
      * @param LocatorInterface $locator
58 58
      * @param null|Section     $section
59 59
      */
60
-    public function __construct($locator, $section=null)
60
+    public function __construct($locator, $section = null)
61 61
     {
62 62
         $this->locator = $locator;
63 63
         $this->section = $section ?: new Section();
@@ -196,13 +196,13 @@  discard block
 block discarded – undo
196 196
      */
197 197
     private function doRender($file, $data)
198 198
     {
199
-        $this->view_data               = array_merge($this->view_data, $data);
199
+        $this->view_data = array_merge($this->view_data, $data);
200 200
         if (is_array($file)) {
201
-            foreach($file as $key => $val) {
201
+            foreach ($file as $key => $val) {
202 202
                 $this->section->set($key, $val);
203 203
             }
204 204
         }
205
-        elseif(!$this->view_file = $this->getPath($file)) {
205
+        elseif (!$this->view_file = $this->getPath($file)) {
206 206
             return null;
207 207
         }
208 208
         else {
Please login to merge, or discard this patch.
Braces   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -140,7 +140,9 @@  discard block
 block discarded – undo
140 140
      */
141 141
     public function __get($name)
142 142
     {
143
-        if ($name === 'section') return $this->section;
143
+        if ($name === 'section') {
144
+            return $this->section;
145
+        }
144 146
         return $this->service($name);
145 147
     }
146 148
 
@@ -201,11 +203,9 @@  discard block
 block discarded – undo
201 203
             foreach($file as $key => $val) {
202 204
                 $this->section->set($key, $val);
203 205
             }
204
-        }
205
-        elseif(!$this->view_file = $this->getPath($file)) {
206
+        } elseif(!$this->view_file = $this->getPath($file)) {
206 207
             return null;
207
-        }
208
-        else {
208
+        } else {
209 209
             $this->setContent($this->renderViewFile());
210 210
         }
211 211
         if (!isset($this->layout_file)) {
Please login to merge, or discard this patch.