Passed
Push — master ( e82bb8...b7aac0 )
by Luiz Kim
02:37
created
src/Service/PrintService.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
     public function addLine($prefix = '', $suffix = '', $delimiter = ' ')
27 27
     {
28 28
         $initialSpace = str_repeat(" ", $this->initialSpace);
29
-        $count =   $this->totalChars - $this->initialSpace - strlen($prefix) - strlen($suffix);
29
+        $count = $this->totalChars - $this->initialSpace - strlen($prefix) - strlen($suffix);
30 30
         if ($count > 0)
31 31
             $delimiter = str_repeat($delimiter, $count);
32 32
         $this->text .= $initialSpace . $prefix . $delimiter . $suffix . "\n";
@@ -35,11 +35,11 @@  discard block
 block discarded – undo
35 35
     public function generatePrintData(Device $device, People $provider): Spool
36 36
     {
37 37
         $printer = null;
38
-        $device_config =  $this->deviceService->discoveryDeviceConfig($device, $provider);
38
+        $device_config = $this->deviceService->discoveryDeviceConfig($device, $provider);
39 39
         if (isset($device_config['printer']))
40 40
             $printer = $this->deviceService->discoveryDevice($device_config['printer']);
41 41
 
42
-        $content =  [
42
+        $content = [
43 43
             "operation" => "PRINT_TEXT",
44 44
             "styles" => [[]],
45 45
             "value" => [$this->text]
Please login to merge, or discard this patch.
Braces   +9 added lines, -6 removed lines patch added patch discarded remove patch
@@ -27,8 +27,9 @@  discard block
 block discarded – undo
27 27
     {
28 28
         $initialSpace = str_repeat(" ", $this->initialSpace);
29 29
         $count =   $this->totalChars - $this->initialSpace - strlen($prefix) - strlen($suffix);
30
-        if ($count > 0)
31
-            $delimiter = str_repeat($delimiter, $count);
30
+        if ($count > 0) {
31
+                    $delimiter = str_repeat($delimiter, $count);
32
+        }
32 33
         $this->text .= $initialSpace . $prefix . $delimiter . $suffix . "\n";
33 34
     }
34 35
 
@@ -36,8 +37,9 @@  discard block
 block discarded – undo
36 37
     {
37 38
         $printer = null;
38 39
         $device_config =  $this->deviceService->discoveryDeviceConfig($device, $provider);
39
-        if (isset($device_config['printer']))
40
-            $printer = $this->deviceService->discoveryDevice($device_config['printer']);
40
+        if (isset($device_config['printer'])) {
41
+                    $printer = $this->deviceService->discoveryDevice($device_config['printer']);
42
+        }
41 43
 
42 44
         $content =  [
43 45
             "operation" => "PRINT_TEXT",
@@ -47,8 +49,9 @@  discard block
 block discarded – undo
47 49
 
48 50
         $printData = $this->addToSpool($printer ?? $device, json_encode($content));
49 51
 
50
-        if ($printer != $device)
51
-            $x = '';
52
+        if ($printer != $device) {
53
+                    $x = '';
54
+        }
52 55
 
53 56
         return $printData;
54 57
     }
Please login to merge, or discard this patch.
src/Entity/Spool.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@
 block discarded – undo
39 39
     #[ORM\Column(name: 'id', type: 'integer', nullable: false)]
40 40
     #[ORM\Id]
41 41
     #[ORM\GeneratedValue(strategy: 'IDENTITY')]
42
-    #[Groups(['spool_item:read', 'spool:read',])]
42
+    #[Groups(['spool_item:read', 'spool:read', ])]
43 43
     #[ApiFilter(filterClass: SearchFilter::class, properties: ['id' => 'exact'])]
44 44
 
45 45
     private $id;
Please login to merge, or discard this patch.