Passed
Push — master ( d2ad69...686350 )
by Kacper
02:44
created
Utils/Console.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@
 block discarded – undo
27 27
      * @return ConsoleHelper
28 28
      */
29 29
     public static function get() {
30
-        if(!isset(self::$_instance)) {
30
+        if (!isset(self::$_instance)) {
31 31
             self::$_instance = new ConsoleHelper();
32 32
         }
33 33
 
Please login to merge, or discard this patch.
Utils/ConsoleHelper.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
     ];
32 32
 
33 33
     public function styled($style, $text) {
34
-        return $this->open($style).$text.$this->close();
34
+        return $this->open($style) . $text . $this->close();
35 35
     }
36 36
 
37 37
     public function open($style)
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
     public function close()
49 49
     {
50 50
         $this->_current = empty($this->_stack) ? $this->_default : array_pop($this->_stack);
51
-        return "\033[0m".$this->_set(array_diff($this->_current, $this->_default));
51
+        return "\033[0m" . $this->_set(array_diff($this->_current, $this->_default));
52 52
     }
53 53
 
54 54
     private function _color($name, $bg = false)
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
     }
78 78
 
79 79
     private function _style($name, $value) {
80
-        switch($name) {
80
+        switch ($name) {
81 81
             case 'color':
82 82
                 return $this->_color($value);
83 83
             case 'background':
@@ -98,9 +98,9 @@  discard block
 block discarded – undo
98 98
     }
99 99
 
100 100
     private function _set($style) {
101
-        $escape = "\e[".implode(';', array_map(function($style, $name) {
101
+        $escape = "\e[" . implode(';', array_map(function($style, $name) {
102 102
             return $this->_style($style, $name);
103
-        }, array_keys($style), $style)).'m';
103
+        }, array_keys($style), $style)) . 'm';
104 104
 
105 105
         return $escape === "\e[m" ? null : $escape;
106 106
     }
Please login to merge, or discard this patch.