Passed
Push — master ( 88087c...22d0de )
by smiley
01:43
created
src/LogOptions.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,6 +19,6 @@
 block discarded – undo
19 19
  * @property string $consoleFormat
20 20
  * @property string $consoleDateFormat
21 21
  */
22
-class LogOptions extends ContainerAbstract{
22
+class LogOptions extends ContainerAbstract {
23 23
 	use LogOptionsTrait;
24 24
 }
Please login to merge, or discard this patch.
src/LogOptionsTrait.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@
 block discarded – undo
14 14
 
15 15
 use Psr\Log\LogLevel;
16 16
 
17
-trait LogOptionsTrait{
17
+trait LogOptionsTrait {
18 18
 
19 19
 	/**
20 20
 	 * @see \Psr\Log\LogLevel
Please login to merge, or discard this patch.
src/Output/LogOutputAbstract.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -18,18 +18,18 @@  discard block
 block discarded – undo
18 18
 /**
19 19
  *
20 20
  */
21
-abstract class LogOutputAbstract implements LogOutputInterface{
21
+abstract class LogOutputAbstract implements LogOutputInterface {
22 22
 
23 23
 	/**
24 24
 	 * @var \chillerlan\Logger\LogOptions
25 25
 	 */
26 26
 	protected $options;
27 27
 
28
-	public function __construct(ContainerInterface $options = null){
28
+	public function __construct(ContainerInterface $options = null) {
29 29
 		$this->options = $options ?? new LogOptions;
30 30
 	}
31 31
 
32
-	public function __destruct(){
32
+	public function __destruct() {
33 33
 		$this->close();
34 34
 	}
35 35
 
@@ -39,8 +39,8 @@  discard block
 block discarded – undo
39 39
 
40 40
 	abstract protected function __log(string $level, string $message, array $context = null);
41 41
 
42
-	public function log(string $level, string $message, array $context = null){ // @todo: loglevel bitmask
43
-		if((array_key_exists($level, $this::LEVELS) && $this::LEVELS[$level] >= $this::LEVELS[$this->options->minLogLevel]) || (!array_key_exists($level, $this::LEVELS) && !empty($level))){
42
+	public function log(string $level, string $message, array $context = null) { // @todo: loglevel bitmask
43
+		if ((array_key_exists($level, $this::LEVELS) && $this::LEVELS[$level] >= $this::LEVELS[$this->options->minLogLevel]) || (!array_key_exists($level, $this::LEVELS) && !empty($level))) {
44 44
 			$this->__log($level, $message, $context);
45 45
 		}
46 46
 	}
Please login to merge, or discard this patch.
src/LogTrait.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
  * @implements \Psr\Log\LoggerAwareInterface
22 22
  * @implements \Psr\Log\LoggerInterface
23 23
  */
24
-trait LogTrait{
24
+trait LogTrait {
25 25
 	use LoggerTrait;
26 26
 
27 27
 	/**
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
 	 *
37 37
 	 * @return void
38 38
 	 */
39
-	public function setLogger(LoggerInterface $logger){
39
+	public function setLogger(LoggerInterface $logger) {
40 40
 		$this->log = $logger;
41 41
 	}
42 42
 
@@ -49,9 +49,9 @@  discard block
 block discarded – undo
49 49
 	 *
50 50
 	 * @return void
51 51
 	 */
52
-	public function log($level, $message, array $context = []){
52
+	public function log($level, $message, array $context = []) {
53 53
 
54
-		if($this->log instanceof LoggerInterface){
54
+		if ($this->log instanceof LoggerInterface) {
55 55
 			$this->log->log($level, $message, $context);
56 56
 		}
57 57
 
Please login to merge, or discard this patch.