Passed
Push — master ( 610149...3e6a67 )
by Henri
01:18
created
src/Viewer.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@  discard block
 block discarded – undo
2 2
 
3 3
 namespace HnrAzevedo\Viewer;
4 4
 
5
-class Viewer{
5
+class Viewer {
6 6
     use HelperTrait, CheckTrait;
7 7
 
8 8
     private static $instance = null;
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
 
17 17
     public static function getInstance(string $path): Viewer
18 18
     {
19
-        if(is_null(self::$instance)){
19
+        if (is_null(self::$instance)) {
20 20
             self::$instance = new self($path);
21 21
         }
22 22
         return self::$instance;
@@ -29,13 +29,13 @@  discard block
 block discarded – undo
29 29
 
30 30
     public function render(string $file, array $data = [], bool $return = false): string
31 31
     {
32
-        if(!headers_sent()){
32
+        if (!headers_sent()) {
33 33
             header('Content-Type: text/html; charset=utf-8');
34 34
         }
35 35
         
36 36
         $this->check_viewExist($file);
37 37
 
38
-        $buffer = $this->getOB($this->path . DIRECTORY_SEPARATOR . $file . '.view.php', $data);
38
+        $buffer = $this->getOB($this->path.DIRECTORY_SEPARATOR.$file.'.view.php', $data);
39 39
         
40 40
         $buffer = $this->getVars($buffer);
41 41
         
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
 
44 44
         $this->saveData();
45 45
 
46
-        if(!$return){
46
+        if (!$return) {
47 47
             echo $buffer;
48 48
             return '';
49 49
         }
Please login to merge, or discard this patch.