@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | } |
29 | 29 | |
30 | 30 | $selector = trim(substr($this->tss, $pos, $next-$pos)); |
31 | - $pos = strpos($this->tss, '}', $next)+1; |
|
31 | + $pos = strpos($this->tss, '}', $next)+1; |
|
32 | 32 | $newRules = $this->cssToRules($selector, count($rules)+$indexStart, $this->getProperties(trim(substr($this->tss, $next+1, $pos-2-$next)))); |
33 | 33 | $rules = $this->writeRule($rules, $newRules); |
34 | 34 | } |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | private function processingInstructions($tss, $pos, $next, $indexStart) { |
63 | 63 | $rules = []; |
64 | 64 | while (($atPos = strpos($tss, '@', $pos)) !== false) { |
65 | - if ($atPos <= (int) $next) { |
|
65 | + if ($atPos <= (int) $next) { |
|
66 | 66 | $spacePos = strpos($tss, ' ', $atPos); |
67 | 67 | $funcName = substr($tss, $atPos+1, $spacePos-$atPos-1); |
68 | 68 | $pos = strpos($tss, ';', $spacePos); |
@@ -78,12 +78,12 @@ discard block |
||
78 | 78 | } |
79 | 79 | |
80 | 80 | private function import($args, $indexStart) { |
81 | - if (is_file(trim($args,'\'" '))) $fileName = trim($args,'\'" '); |
|
81 | + if (is_file(trim($args, '\'" '))) $fileName = trim($args, '\'" '); |
|
82 | 82 | else $fileName = $this->valueParser->parse($args)[0]; |
83 | 83 | |
84 | - if (is_file($this->baseDir . $fileName)) $tssFile = $this->baseDir . $fileName; |
|
84 | + if (is_file($this->baseDir.$fileName)) $tssFile = $this->baseDir.$fileName; |
|
85 | 85 | elseif (is_file($fileName)) $tssFile = $fileName; |
86 | - else throw new \Exception('Imported TSS File "' . $fileName .'" does not exist'); |
|
86 | + else throw new \Exception('Imported TSS File "'.$fileName.'" does not exist'); |
|
87 | 87 | |
88 | 88 | $sheet = new Sheet(file_get_contents($tssFile), $this->baseDir, $this->xPath, $this->valueParser); |
89 | 89 | return $sheet->parse(0, [], $indexStart); |
@@ -11,16 +11,16 @@ |
||
11 | 11 | $json = $args[0]; |
12 | 12 | |
13 | 13 | if (trim($json)[0] != '{') { |
14 | - if (is_file($this->baseDir . $args[0])) $jsonFile = $this->baseDir . $json; |
|
14 | + if (is_file($this->baseDir.$args[0])) $jsonFile = $this->baseDir.$json; |
|
15 | 15 | elseif (is_file($args[0])) $jsonFile = $json; |
16 | - else throw new \Exception('JSON File "' . $json .'" does not exist'); |
|
16 | + else throw new \Exception('JSON File "'.$json.'" does not exist'); |
|
17 | 17 | |
18 | 18 | $json = file_get_contents($jsonFile); |
19 | 19 | } |
20 | 20 | |
21 | 21 | $map = json_decode($json, true); |
22 | 22 | |
23 | - if (!is_array($map)) throw new \Exception('Could not decode json: ' . json_last_error_msg()); |
|
23 | + if (!is_array($map)) throw new \Exception('Could not decode json: '.json_last_error_msg()); |
|
24 | 24 | |
25 | 25 | return $map; |
26 | 26 | } |
@@ -27,14 +27,14 @@ |
||
27 | 27 | $selector = $this->readArray($args, 1); |
28 | 28 | $tss = $this->readArray($args, 2); |
29 | 29 | |
30 | - if (is_file($this->baseDir . $args[0])) $xmlFile = $this->baseDir . $args[0]; |
|
30 | + if (is_file($this->baseDir.$args[0])) $xmlFile = $this->baseDir.$args[0]; |
|
31 | 31 | elseif (is_file($args[0])) $xmlFile = $args[0]; |
32 | - else throw new \Exception('XML File "' . $args[0] .'" does not exist'); |
|
32 | + else throw new \Exception('XML File "'.$args[0].'" does not exist'); |
|
33 | 33 | |
34 | 34 | if ($tss) { |
35 | - if (is_file($this->baseDir . $tss)) $tssFile = $this->baseDir . $tss; |
|
35 | + if (is_file($this->baseDir.$tss)) $tssFile = $this->baseDir.$tss; |
|
36 | 36 | elseif (is_file($args[0])) $tssFile = $tss; |
37 | - else throw new \Exception('TSS File "' . $tss .'" does not exist'); |
|
37 | + else throw new \Exception('TSS File "'.$tss.'" does not exist'); |
|
38 | 38 | } |
39 | 39 | else $tssFile = null; |
40 | 40 |