Completed
Pull Request — master (#24)
by
unknown
06:24 queued 03:07
created
src/Logger/LoggerInterface.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -108,7 +108,7 @@
 block discarded – undo
108 108
      *
109 109
      * @return $this
110 110
      */
111
-    public function end(string $str = '', bool $force =  false, $logLevel = LogLevels::INFO);
111
+    public function end(string $str = '', bool $force = false, $logLevel = LogLevels::INFO);
112 112
 
113 113
     /**
114 114
      * Log a message that ends a task with an HTTP status code.
Please login to merge, or discard this patch.
src/Logger/Writer/FileWriter.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
         }
110 110
 
111 111
         // apply each of the formatters we've attached to this writer
112
-        foreach($this->formatters as $formatter) {
112
+        foreach ($this->formatters as $formatter) {
113 113
             list($timestamp, $logLevel, $message, $indentLevel, $duration) = $formatter->format($timestamp, $logLevel, $indentLevel, $message, $duration);
114 114
         }
115 115
 
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
         $indentation = $indentLevel ? str_repeat('  ', $indentLevel).'- ' : '';
118 118
 
119 119
         // build the log entry we'll write to the stream
120
-        $logEntry = $timestamp . ' ' . $indentation . ' ' .$message;
120
+        $logEntry = $timestamp.' '.$indentation.' '.$message;
121 121
         if ($this->showDurations) {
122 122
             $logEntry .= ' '.$duration;
123 123
         }
Please login to merge, or discard this patch.
src/Logger/Writer/IoStreamWriter.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
         }
113 113
 
114 114
         // apply each of the formatters we've attached to this writer
115
-        foreach($this->formatters as $formatter) {
115
+        foreach ($this->formatters as $formatter) {
116 116
             list($timestamp, $logLevel, $message, $indentLevel, $duration) = $formatter->format($timestamp, $logLevel, $indentLevel, $message, $duration);
117 117
         }
118 118
 
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
         $indentation = $indentLevel ? str_repeat('  ', $indentLevel).'- ' : '';
121 121
 
122 122
         // build the log entry we'll write to the file
123
-        $logEntry = $timestamp . ' ' . strtoupper($logLevel) . ' ' . $indentation . ' ' .$message;
123
+        $logEntry = $timestamp.' '.strtoupper($logLevel).' '.$indentation.' '.$message;
124 124
         if ($this->showDurations) {
125 125
             $logEntry .= ' '.$duration;
126 126
         }
Please login to merge, or discard this patch.
src/Logger/Formatter/ColorStreamFormatter.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -150,7 +150,7 @@
 block discarded – undo
150 150
         $time = strftime($this->getDateFormat(), $time);
151 151
         $message = $this->colorify($message, $logLevel);
152 152
 
153
-        if ($this->showDurations && ! is_null($duration)) {
153
+        if ($this->showDurations && !is_null($duration)) {
154 154
             $duration = $this->formatDuration($duration);
155 155
             $duration = $this->colorify($duration, 'duration');
156 156
         } else {
Please login to merge, or discard this patch.
src/Logger/Logger.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -152,7 +152,7 @@
 block discarded – undo
152 152
             foreach ($this->taskStack as $task) {
153 153
                 list($taskStr, $taskTimestamp, $taskIndentLevel) = $task;
154 154
                 if ($taskIndentLevel > $this->getMaxLevel()) {
155
-                  $this->write($taskTimestamp, LogLevels::INFO, $taskStr, $taskIndentLevel);
155
+                    $this->write($taskTimestamp, LogLevels::INFO, $taskStr, $taskIndentLevel);
156 156
                 }
157 157
             }
158 158
         }
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -197,7 +197,7 @@  discard block
 block discarded – undo
197 197
      *
198 198
      * @return $this
199 199
      */
200
-    public function end(string $str = '', bool $force =  false, $logLevel = LogLevels::INFO) {
200
+    public function end(string $str = '', bool $force = false, $logLevel = LogLevels::INFO) {
201 201
         // get the task we are finishing (there has to be one)
202 202
         $task = array_pop($this->taskStack);
203 203
         if (is_null($task)) {
@@ -255,7 +255,7 @@  discard block
 block discarded – undo
255 255
      * @return $this
256 256
      */
257 257
     public function write(int $timestamp, string $logLevel, string $message, $indentLevel = 0, $duration = null) {
258
-        foreach($this->writers as $writer) {
258
+        foreach ($this->writers as $writer) {
259 259
             $writer->write($timestamp, $logLevel, $message, $indentLevel, $duration);
260 260
         }
261 261
 
Please login to merge, or discard this patch.
src/Logger/LogLevels.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@
 block discarded – undo
13 13
  * The Garden logger has its own version of log levels different from RFC 5424 and RFC 3164.
14 14
  */
15 15
 class LogLevels {
16
-    const INFO  = 'info'; // is also the "default" level
16
+    const INFO = 'info'; // is also the "default" level
17 17
     const SUCCESS  = 'success';
18 18
     const ERROR    = 'error';
19 19
     const WARNING  = 'warning';
Please login to merge, or discard this patch.