Passed
Push — master ( ae530f...66056f )
by Php Easy Api
02:37
created
src/resta/Logger/LoggerHandler.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
      * LoggerHandler constructor.
27 27
      * @param null $file
28 28
      */
29
-    public function __construct($file=null)
29
+    public function __construct($file = null)
30 30
     {
31 31
         $this->file = $file;
32 32
         $this->logger = core()->loggerService;
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
      */
52 52
     public function alert($message, array $context = [])
53 53
     {
54
-        $this->writeLog(__FUNCTION__,$message,$context);
54
+        $this->writeLog(__FUNCTION__, $message, $context);
55 55
     }
56 56
 
57 57
     /**
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
      */
64 64
     public function critical($message, array $context = [])
65 65
     {
66
-        $this->writeLog(__FUNCTION__,$message,$context);
66
+        $this->writeLog(__FUNCTION__, $message, $context);
67 67
     }
68 68
 
69 69
     /**
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
      */
76 76
     public function debug($message, array $context = [])
77 77
     {
78
-        $this->writeLog(__FUNCTION__,$message,$context);
78
+        $this->writeLog(__FUNCTION__, $message, $context);
79 79
     }
80 80
 
81 81
     /**
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
      */
88 88
     public function emergency($message, array $context = [])
89 89
     {
90
-        $this->writeLog(__FUNCTION__,$message,$context);
90
+        $this->writeLog(__FUNCTION__, $message, $context);
91 91
     }
92 92
 
93 93
     /**
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
      */
100 100
     public function error($message, array $context = [])
101 101
     {
102
-        $this->writeLog(__FUNCTION__,$message,$context);
102
+        $this->writeLog(__FUNCTION__, $message, $context);
103 103
     }
104 104
 
105 105
     /**
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
      */
112 112
     public function info($message, array $context = [])
113 113
     {
114
-        $this->writeLog(__FUNCTION__,$message,$context);
114
+        $this->writeLog(__FUNCTION__, $message, $context);
115 115
     }
116 116
 
117 117
     /**
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
      */
136 136
     public function notice($message, array $context = [])
137 137
     {
138
-        $this->writeLog(__FUNCTION__,$message,$context);
138
+        $this->writeLog(__FUNCTION__, $message, $context);
139 139
     }
140 140
 
141 141
     /**
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
      */
148 148
     public function warning($message, array $context = [])
149 149
     {
150
-        $this->writeLog(__FUNCTION__,$message,$context);
150
+        $this->writeLog(__FUNCTION__, $message, $context);
151 151
     }
152 152
 
153 153
     /**
@@ -158,11 +158,11 @@  discard block
 block discarded – undo
158 158
      * @param $context
159 159
      * @return void
160 160
      */
161
-    protected function writeLog($level, $message,$context)
161
+    protected function writeLog($level, $message, $context)
162 162
     {
163 163
         $file = ($this->file===null) ? $level : $this->file;
164 164
 
165
-        if($this->adapter!==null){
165
+        if ($this->adapter!==null) {
166 166
 
167 167
             $adapter = $this->adapter;
168 168
 
@@ -171,8 +171,8 @@  discard block
 block discarded – undo
171 171
             });
172 172
         }
173 173
 
174
-        if($this->logger!==null){
175
-            $this->logger->logHandler($message,$file,$level);
174
+        if ($this->logger!==null) {
175
+            $this->logger->logHandler($message, $file, $level);
176 176
         }
177 177
 
178 178
         return $context;
Please login to merge, or discard this patch.