Passed
Push — master ( 986dc0...a43723 )
by Luiz Kim
02:39
created
src/Service/PrintService.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
     public function addLine($prefix = '', $suffix = '', $delimiter = ' ')
33 33
     {
34 34
         $initialSpace = str_repeat(" ", $this->initialSpace);
35
-        $count =   $this->totalChars - $this->initialSpace - strlen($prefix) - strlen($suffix);
35
+        $count = $this->totalChars - $this->initialSpace - strlen($prefix) - strlen($suffix);
36 36
         if ($count > 0)
37 37
             $delimiter = str_repeat($delimiter, $count);
38 38
         $this->text .= $initialSpace . $prefix . $delimiter . $suffix . "\n";
@@ -50,11 +50,11 @@  discard block
 block discarded – undo
50 50
     public function generatePrintData(Device $device, People $provider, ?array $aditionalData = []): Spool
51 51
     {
52 52
         $printer = null;
53
-        $device_config =  $this->deviceService->discoveryDeviceConfig($device, $provider)->getConfigs(true);
53
+        $device_config = $this->deviceService->discoveryDeviceConfig($device, $provider)->getConfigs(true);
54 54
         if (isset($device_config['printer']))
55 55
             $printer = $this->deviceService->discoveryDevice($device_config['printer']);
56 56
 
57
-        $content =  [
57
+        $content = [
58 58
             "operation" => "PRINT_TEXT",
59 59
             "styles" => [[]],
60 60
             "value" => [$this->text]
Please login to merge, or discard this patch.
Braces   +9 added lines, -6 removed lines patch added patch discarded remove patch
@@ -33,8 +33,9 @@  discard block
 block discarded – undo
33 33
     {
34 34
         $initialSpace = str_repeat(" ", $this->initialSpace);
35 35
         $count =   $this->totalChars - $this->initialSpace - strlen($prefix) - strlen($suffix);
36
-        if ($count > 0)
37
-            $delimiter = str_repeat($delimiter, $count);
36
+        if ($count > 0) {
37
+                    $delimiter = str_repeat($delimiter, $count);
38
+        }
38 39
         $this->text .= $initialSpace . $prefix . $delimiter . $suffix . "\n";
39 40
     }
40 41
 
@@ -51,8 +52,9 @@  discard block
 block discarded – undo
51 52
     {
52 53
         $printer = null;
53 54
         $device_config =  $this->deviceService->discoveryDeviceConfig($device, $provider)->getConfigs(true);
54
-        if (isset($device_config['printer']))
55
-            $printer = $this->deviceService->discoveryDevice($device_config['printer']);
55
+        if (isset($device_config['printer'])) {
56
+                    $printer = $this->deviceService->discoveryDevice($device_config['printer']);
57
+        }
56 58
 
57 59
         $content =  [
58 60
             "operation" => "PRINT_TEXT",
@@ -62,8 +64,9 @@  discard block
 block discarded – undo
62 64
 
63 65
         $printData = $this->addToSpool($printer ?: $device, json_encode($content), $aditionalData);
64 66
 
65
-        if ($printer != $device)
66
-            $x = '';
67
+        if ($printer != $device) {
68
+                    $x = '';
69
+        }
67 70
 
68 71
         return $printData;
69 72
     }
Please login to merge, or discard this patch.