Passed
Push — master ( 1f758d...de7676 )
by Ioannes
01:50
created
src/Format/XmlCommand.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
     public function getXmlFile($archive = true) {
10 10
 
11 11
         $path = $this->getDocumentRoot() . static::FINAL_FOLDER . static::XML_FILE;
12
-        if(static::GZIP === true && $archive) {
12
+        if (static::GZIP === true && $archive) {
13 13
             $path .= '.gz';
14 14
         }
15 15
         return $path;
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
     protected function getTmpXmlFile($archive = true) {
19 19
 
20 20
         $path = $this->getDocumentRoot() . static::TMP_FOLDER . static::XML_FILE;
21
-        if(static::GZIP === true && $archive) {
21
+        if (static::GZIP === true && $archive) {
22 22
             $path .= '.gz';
23 23
         }
24 24
         return $path;
@@ -28,13 +28,13 @@  discard block
 block discarded – undo
28 28
 
29 29
         @unlink($this->getTmpXmlFile(false));
30 30
         $res = file_put_contents($this->getTmpXmlFile(false), $xml);
31
-        if(static::GZIP) {
31
+        if (static::GZIP) {
32 32
             unlink($this->getTmpXmlFile());
33 33
             chdir(pathinfo($this->getTmpXmlFile(), PATHINFO_DIRNAME));
34 34
             exec("gzip " . self::XML_FILE);
35 35
         }
36 36
 
37
-        if($res) {
37
+        if ($res) {
38 38
 
39 39
             //TODO: check size !!!
40 40
             $command = sprintf("mv %s %s", $this->getTmpXmlFile(), $this->getXmlFile());
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
         } else {
44 44
             /** @var LoggerInterface $logger */
45 45
             $logger = $this->getLogger();
46
-            if($logger) {
46
+            if ($logger) {
47 47
                 $logger->error($this->getName() . ' ERROR: unable write file!');
48 48
             }
49 49
         }
Please login to merge, or discard this patch.
src/Format/XlsCommand.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -20,13 +20,13 @@  discard block
 block discarded – undo
20 20
         $htmlFile = str_replace('.xls', '.html', static::XLS_FILE);
21 21
         $htmlRes = file_put_contents($this->getDocumentRoot() . static::TMP_FOLDER . $htmlFile, $html);
22 22
 
23
-        if($htmlRes) {
23
+        if ($htmlRes) {
24 24
 
25 25
             //TODO: check size !!!
26 26
             chdir($this->getDocumentRoot() . static::TMP_FOLDER);
27 27
             $command = sprintf("libreoffice --calc --convert-to xls %s", $htmlFile);
28 28
             exec($command);
29
-            if(file_exists($this->getTmpXlsFile())) {
29
+            if (file_exists($this->getTmpXlsFile())) {
30 30
                 unlink($this->getDocumentRoot() . static::TMP_FOLDER . $htmlFile);
31 31
                 $command = sprintf("mv %s %s", $this->getTmpXlsFile(), $this->getXlsFile());
32 32
                 exec($command);
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
         } else {
37 37
             /** @var LoggerInterface $logger */
38 38
             $logger = $this->getLogger();
39
-            if($logger) {
39
+            if ($logger) {
40 40
                 $logger->error($this->getName() . ' ERROR: unable write file!');
41 41
             }
42 42
         }
Please login to merge, or discard this patch.