Passed
Branch main (87a4b7)
by ANDREY
04:38 queued 02:14
created
tests/JSConsoleLoggerTest.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
     public function testLog()
27 27
     {
28 28
         ob_start();
29
-        $this->logger->log(LogLevel::EMERGENCY, "testEmergency {Interpolation}",['Interpolation'=>'InterpolationEmergency']);
29
+        $this->logger->log(LogLevel::EMERGENCY, "testEmergency {Interpolation}", ['Interpolation'=>'InterpolationEmergency']);
30 30
         $capture = ob_get_clean();
31 31
         $this->assertTrue(strpos($capture, "console.log") !== false);
32 32
         $this->assertTrue(strpos($capture, "testEmergency") !== false);
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
     public function testEmergency()
37 37
     {
38 38
         ob_start();
39
-        $this->logger->emergency("testEmergency {Interpolation}",['Interpolation'=>'InterpolationEmergency']);
39
+        $this->logger->emergency("testEmergency {Interpolation}", ['Interpolation'=>'InterpolationEmergency']);
40 40
         $capture = ob_get_clean();
41 41
         $this->assertTrue(strpos($capture, "console.log") !== false);
42 42
         $this->assertTrue(strpos($capture, "testEmergency") !== false);
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
     public function testAlert()
47 47
     {
48 48
         ob_start();
49
-        $this->logger->alert("testAlert {Interpolation}",['Interpolation'=>'InterpolationAlert']);
49
+        $this->logger->alert("testAlert {Interpolation}", ['Interpolation'=>'InterpolationAlert']);
50 50
         $capture = ob_get_clean();
51 51
         $this->assertTrue(strpos($capture, "console.log") !== false);
52 52
         $this->assertTrue(strpos($capture, "testAlert") !== false);
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
     public function testCritical()
57 57
     {
58 58
         ob_start();
59
-        $this->logger->critical("testCritical {Interpolation}",['Interpolation'=>'InterpolationCritical']);
59
+        $this->logger->critical("testCritical {Interpolation}", ['Interpolation'=>'InterpolationCritical']);
60 60
         $capture = ob_get_clean();
61 61
         $this->assertTrue(strpos($capture, "console.log") !== false);
62 62
         $this->assertTrue(strpos($capture, "testCritical") !== false);
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
     public function testError()
67 67
     {
68 68
         ob_start();
69
-        $this->logger->error("testError {Interpolation}",['Interpolation'=>'InterpolationError']);
69
+        $this->logger->error("testError {Interpolation}", ['Interpolation'=>'InterpolationError']);
70 70
         $capture = ob_get_clean();
71 71
         $this->assertTrue(strpos($capture, "console.error") !== false);
72 72
         $this->assertTrue(strpos($capture, "testError") !== false);
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
     public function testWarning()
77 77
     {
78 78
         ob_start();
79
-        $this->logger->warning("testWarning {Interpolation}",['Interpolation'=>'InterpolationWarning']);
79
+        $this->logger->warning("testWarning {Interpolation}", ['Interpolation'=>'InterpolationWarning']);
80 80
         $capture = ob_get_clean();
81 81
         $this->assertTrue(strpos($capture, "console.warn") !== false);
82 82
         $this->assertTrue(strpos($capture, "testWarning") !== false);
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
     public function testNotice()
87 87
     {
88 88
         ob_start();
89
-        $this->logger->notice("testNotice {Interpolation}",['Interpolation'=>'InterpolationNotice']);
89
+        $this->logger->notice("testNotice {Interpolation}", ['Interpolation'=>'InterpolationNotice']);
90 90
         $capture = ob_get_clean();
91 91
         $this->assertTrue(strpos($capture, "console.log") !== false);
92 92
         $this->assertTrue(strpos($capture, "testNotice") !== false);
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
     public function testInfo()
97 97
     {
98 98
         ob_start();
99
-        $this->logger->info("testInfo {Interpolation}",['Interpolation'=>'InterpolationInfo']);
99
+        $this->logger->info("testInfo {Interpolation}", ['Interpolation'=>'InterpolationInfo']);
100 100
         $capture = ob_get_clean();
101 101
         $this->assertTrue(strpos($capture, "console.info") !== false);
102 102
         $this->assertTrue(strpos($capture, "testInfo") !== false);
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
     public function testDebug()
107 107
     {
108 108
         ob_start();
109
-        $this->logger->debug("testDebug {Interpolation}",['Interpolation'=>'InterpolationDebug']);
109
+        $this->logger->debug("testDebug {Interpolation}", ['Interpolation'=>'InterpolationDebug']);
110 110
         $capture = ob_get_clean();
111 111
         $this->assertTrue(strpos($capture, "console.debug") !== false);
112 112
         $this->assertTrue(strpos($capture, "testDebug") !== false);
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
     public function testTable()
117 117
     {
118 118
         ob_start();
119
-        $this->logger->table("testTable {Interpolation}",['Interpolation'=>'InterpolationDebug']);
119
+        $this->logger->table("testTable {Interpolation}", ['Interpolation'=>'InterpolationDebug']);
120 120
         $capture = ob_get_clean();
121 121
         $this->assertTrue(strpos($capture, "console.table") !== false);
122 122
         $this->assertTrue(strpos($capture, "testTable") !== false);
Please login to merge, or discard this patch.
tests/ConsoleLoggerTest.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
     public function testEmergency()
26 26
     {
27 27
         ob_start();
28
-        $this->logger->emergency("testEmergency {Interpolation}",['Interpolation'=>'InterpolationEmergency']);
28
+        $this->logger->emergency("testEmergency {Interpolation}", ['Interpolation'=>'InterpolationEmergency']);
29 29
         $capture = ob_get_clean();
30 30
         $this->assertTrue(strpos($capture, "0;35") !== false);
31 31
         $this->assertTrue(strpos($capture, "testEmergency") !== false);
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
     public function testAlert()
36 36
     {
37 37
         ob_start();
38
-        $this->logger->alert("testAlert {Interpolation}",['Interpolation'=>'InterpolationAlert']);
38
+        $this->logger->alert("testAlert {Interpolation}", ['Interpolation'=>'InterpolationAlert']);
39 39
         $capture = ob_get_clean();
40 40
         $this->assertTrue(strpos($capture, "1;31") !== false);
41 41
         $this->assertTrue(strpos($capture, "testAlert") !== false);
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
     public function testCritical()
46 46
     {
47 47
         ob_start();
48
-        $this->logger->critical("testCritical {Interpolation}",['Interpolation'=>'InterpolationCritical']);
48
+        $this->logger->critical("testCritical {Interpolation}", ['Interpolation'=>'InterpolationCritical']);
49 49
         $capture = ob_get_clean();
50 50
         $this->assertTrue(strpos($capture, "0;31") !== false);
51 51
         $this->assertTrue(strpos($capture, "testCritical") !== false);
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
     public function testError()
56 56
     {
57 57
         ob_start();
58
-        $this->logger->error("testError {Interpolation}",['Interpolation'=>'InterpolationError']);
58
+        $this->logger->error("testError {Interpolation}", ['Interpolation'=>'InterpolationError']);
59 59
         $capture = ob_get_clean();
60 60
         $this->assertTrue(strpos($capture, "0;31") !== false);
61 61
         $this->assertTrue(strpos($capture, "testError") !== false);
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
     public function testWarning()
66 66
     {
67 67
         ob_start();
68
-        $this->logger->warning("testWarning {Interpolation}",['Interpolation'=>'InterpolationWarning']);
68
+        $this->logger->warning("testWarning {Interpolation}", ['Interpolation'=>'InterpolationWarning']);
69 69
         $capture = ob_get_clean();
70 70
         $this->assertTrue(strpos($capture, "1;37") !== false);
71 71
         $this->assertTrue(strpos($capture, "testWarning") !== false);
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
     public function testNotice()
76 76
     {
77 77
         ob_start();
78
-        $this->logger->notice("testNotice {Interpolation}",['Interpolation'=>'InterpolationNotice']);
78
+        $this->logger->notice("testNotice {Interpolation}", ['Interpolation'=>'InterpolationNotice']);
79 79
         $capture = ob_get_clean();
80 80
         $this->assertTrue(strpos($capture, "1;33") !== false);
81 81
         $this->assertTrue(strpos($capture, "testNotice") !== false);
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
     public function testInfo()
86 86
     {
87 87
         ob_start();
88
-        $this->logger->info("testInfo {Interpolation}",['Interpolation'=>'InterpolationInfo']);
88
+        $this->logger->info("testInfo {Interpolation}", ['Interpolation'=>'InterpolationInfo']);
89 89
         $capture = ob_get_clean();
90 90
         $this->assertTrue(strpos($capture, "0;32") !== false);
91 91
         $this->assertTrue(strpos($capture, "testInfo") !== false);
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
     public function testDebug()
96 96
     {
97 97
         ob_start();
98
-        $this->logger->debug("testDebug {Interpolation}",['Interpolation'=>'InterpolationDebug']);
98
+        $this->logger->debug("testDebug {Interpolation}", ['Interpolation'=>'InterpolationDebug']);
99 99
         $capture = ob_get_clean();
100 100
         $this->assertTrue(strpos($capture, "1;34") !== false);
101 101
         $this->assertTrue(strpos($capture, "testDebug") !== false);
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
     public function testTable()
106 106
     {
107 107
         ob_start();
108
-        $this->logger->table("testTable {Interpolation}",['Interpolation'=>'InterpolationTable']);
108
+        $this->logger->table("testTable {Interpolation}", ['Interpolation'=>'InterpolationTable']);
109 109
         $capture = ob_get_clean();
110 110
         $this->assertTrue(strpos($capture, "1;37") !== false);
111 111
         $this->assertTrue(strpos($capture, "testTable") !== false);
Please login to merge, or discard this patch.
src/VPA/Logger/BaseLogger.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
      * @param array $context
17 17
      * @return void
18 18
      */
19
-    public function emergency(string|\Stringable $message, array $context = []): void
19
+    public function emergency(string | \Stringable $message, array $context = []): void
20 20
     {
21 21
         $this->log(LogLevel::EMERGENCY, $message, $context);
22 22
     }
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
      * @param array $context
29 29
      * @return void
30 30
      */
31
-    public function alert(string|\Stringable $message, array $context = []): void
31
+    public function alert(string | \Stringable $message, array $context = []): void
32 32
     {
33 33
         $this->log(LogLevel::ALERT, $message, $context);
34 34
     }
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
      * @param array $context
41 41
      * @return void
42 42
      */
43
-    public function critical(string|\Stringable $message, array $context = []): void
43
+    public function critical(string | \Stringable $message, array $context = []): void
44 44
     {
45 45
         $this->log(LogLevel::CRITICAL, $message, $context);
46 46
     }
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
      * @param array $context
54 54
      * @return void
55 55
      */
56
-    public function error(string|\Stringable $message, array $context = []): void
56
+    public function error(string | \Stringable $message, array $context = []): void
57 57
     {
58 58
         $this->log(LogLevel::ERROR, $message, $context);
59 59
     }
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
      * @param array $context
66 66
      * @return void
67 67
      */
68
-    public function warning(string|\Stringable $message, array $context = []): void
68
+    public function warning(string | \Stringable $message, array $context = []): void
69 69
     {
70 70
         $this->log(LogLevel::WARNING, $message, $context);
71 71
     }
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
      * @param array $context
78 78
      * @return void
79 79
      */
80
-    public function notice(string|\Stringable $message, array $context = []): void
80
+    public function notice(string | \Stringable $message, array $context = []): void
81 81
     {
82 82
         $this->log(LogLevel::NOTICE, $message, $context);
83 83
     }
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
      * @param array $context
90 90
      * @return void
91 91
      */
92
-    public function info(string|\Stringable $message, array $context = []): void
92
+    public function info(string | \Stringable $message, array $context = []): void
93 93
     {
94 94
         $this->log(LogLevel::INFO, $message, $context);
95 95
     }
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
      * @param array $context
102 102
      * @return void
103 103
      */
104
-    public function debug(string|\Stringable $message, array $context = []): void
104
+    public function debug(string | \Stringable $message, array $context = []): void
105 105
     {
106 106
         $this->log(LogLevel::DEBUG, $message, $context);
107 107
     }
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
      * @param array $context
114 114
      * @return string
115 115
      */
116
-    protected function interpolate(string|\Stringable $message, array $context = []): string
116
+    protected function interpolate(string | \Stringable $message, array $context = []): string
117 117
     {
118 118
         // build a replacement array with braces around the context keys
119 119
         $replace = array();
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
         return strtr($message, $replace);
126 126
     }
127 127
 
128
-    public function log(mixed $level, string|\Stringable $message, array $context = []): void
128
+    public function log(mixed $level, string | \Stringable $message, array $context = []): void
129 129
     {
130 130
     }
131 131
 
Please login to merge, or discard this patch.
src/VPA/Logger/ConsoleLogger.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
      * @param array $context
17 17
      * @return void
18 18
      */
19
-    public function table(string|\Stringable $message, array $context = []): void
19
+    public function table(string | \Stringable $message, array $context = []): void
20 20
     {
21 21
         $this->log('table', $message . "\n{Table}", ['Table' => print_r($context, true)]);
22 22
     }
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
      * @param array $context
30 30
      * @return void
31 31
      */
32
-    public function log(mixed $level, string|\Stringable $message, array $context = []): void
32
+    public function log(mixed $level, string | \Stringable $message, array $context = []): void
33 33
     {
34 34
         $text = $this->interpolate($message, $context);
35 35
         $color = '1;37';
Please login to merge, or discard this patch.
src/VPA/Logger/JSConsoleLogger.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
      * @param array $context
20 20
      * @return void
21 21
      */
22
-    public function table(string|\Stringable $message, array $context = []): void
22
+    public function table(string | \Stringable $message, array $context = []): void
23 23
     {
24 24
         $this->log('table', $message, $context);
25 25
     }
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
      * @param array $context
33 33
      * @return void
34 34
      */
35
-    public function log(mixed $level, string|\Stringable $message, array $context = []): void
35
+    public function log(mixed $level, string | \Stringable $message, array $context = []): void
36 36
     {
37 37
         $text = $this->interpolate($message, $context);
38 38
         switch ($level) {
Please login to merge, or discard this patch.