@@ -1,15 +1,15 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | 3 | require_once 'config.php'; |
| 4 | -require_once __DIR__ . '/../vendor/autoload.php'; |
|
| 4 | +require_once __DIR__.'/../vendor/autoload.php'; |
|
| 5 | 5 | |
| 6 | 6 | use voku\CssToInlineStyles\CssToInlineStyles; |
| 7 | 7 | |
| 8 | 8 | // create instance |
| 9 | 9 | $cssToInlineStyles = new CssToInlineStyles(); |
| 10 | 10 | |
| 11 | -$html = file_get_contents(__DIR__ . '/examples/sumo/index.htm'); |
|
| 12 | -$css = file_get_contents(__DIR__ . '/examples/sumo/style.css'); |
|
| 11 | +$html = file_get_contents(__DIR__.'/examples/sumo/index.htm'); |
|
| 12 | +$css = file_get_contents(__DIR__.'/examples/sumo/style.css'); |
|
| 13 | 13 | |
| 14 | 14 | $cssToInlineStyles->setHTML($html); |
| 15 | 15 | $cssToInlineStyles->setCSS($css); |
@@ -195,7 +195,7 @@ discard block |
||
| 195 | 195 | // check if there is some link css reference |
| 196 | 196 | if ($this->loadCSSFromHTML) { |
| 197 | 197 | foreach ($dom->find('link') as $node) { |
| 198 | - $file = ($path ?: __DIR__) . '/' . $node->getAttribute('href'); |
|
| 198 | + $file = ($path ?: __DIR__).'/'.$node->getAttribute('href'); |
|
| 199 | 199 | |
| 200 | 200 | if (\file_exists($file)) { |
| 201 | 201 | $css .= \file_get_contents($file); |
@@ -245,7 +245,7 @@ discard block |
||
| 245 | 245 | && |
| 246 | 246 | $this->css_media_queries |
| 247 | 247 | ) { |
| 248 | - $html = \str_ireplace('</head>', "\n" . '<style type="text/css">' . "\n" . $this->css_media_queries . "\n" . '</style>' . "\n" . '</head>', $html); |
|
| 248 | + $html = \str_ireplace('</head>', "\n".'<style type="text/css">'."\n".$this->css_media_queries."\n".'</style>'."\n".'</head>', $html); |
|
| 249 | 249 | } |
| 250 | 250 | |
| 251 | 251 | return $html; |
@@ -273,7 +273,7 @@ discard block |
||
| 273 | 273 | if (!empty($matches[1])) { |
| 274 | 274 | // add |
| 275 | 275 | foreach ($matches[1] as $match) { |
| 276 | - $css .= \trim($match) . "\n"; |
|
| 276 | + $css .= \trim($match)."\n"; |
|
| 277 | 277 | } |
| 278 | 278 | } |
| 279 | 279 | |
@@ -498,7 +498,7 @@ discard block |
||
| 498 | 498 | // build chunks |
| 499 | 499 | foreach ($properties as $key => $values) { |
| 500 | 500 | foreach ((array) $values as $value) { |
| 501 | - $propertyChunks[] = $key . ': ' . $value . ';'; |
|
| 501 | + $propertyChunks[] = $key.': '.$value.';'; |
|
| 502 | 502 | } |
| 503 | 503 | } |
| 504 | 504 | |
@@ -834,7 +834,7 @@ discard block |
||
| 834 | 834 | && |
| 835 | 835 | \strpos($properties[$i + 1], 'base64,') !== false |
| 836 | 836 | ) { |
| 837 | - $properties[$i] .= ';' . $properties[$i + 1]; |
|
| 837 | + $properties[$i] .= ';'.$properties[$i + 1]; |
|
| 838 | 838 | $properties[$i + 1] = ''; |
| 839 | 839 | ++$i; |
| 840 | 840 | } |