Skip to content

Commit 3aad3ba

Browse files
RC10 cleanup/codestyle
1 parent 0238ac6 commit 3aad3ba

File tree

1 file changed

+9
-14
lines changed

1 file changed

+9
-14
lines changed

src/Processor/Processor.php

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
use EM\CssCompiler\Container\FileContainer;
77
use EM\CssCompiler\Exception\CompilerException;
88
use EM\CssCompiler\Exception\FileException;
9-
use Leafo\ScssPhp\Compiler as SASSCompiler;
9+
use Leafo\ScssPhp\Compiler as SCSSCompiler;
1010
use Leafo\ScssPhp\Exception\ParserException;
1111
use lessc as LESSCompiler;
1212
use scss_compass as CompassCompiler;
@@ -39,9 +39,9 @@ class Processor
3939
*/
4040
private $files = [];
4141
/**
42-
* @var SASSCompiler
42+
* @var SCSSCompiler
4343
*/
44-
private $sass;
44+
private $scss;
4545
/**
4646
* @var LESSCompiler
4747
*/
@@ -50,15 +50,10 @@ class Processor
5050
public function __construct(IOInterface $io)
5151
{
5252
$this->io = $io;
53-
$this->initCompilers();
54-
}
55-
56-
protected function initCompilers()
57-
{
5853
$this->less = new LESSCompiler();
59-
$this->sass = new SASSCompiler();
60-
/** attaches compass functionality to the SASS compiler */
61-
new CompassCompiler($this->sass);
54+
$this->scss = new SCSSCompiler();
55+
/** attaches compass functionality to the SCSS compiler */
56+
new CompassCompiler($this->scss);
6257
}
6358

6459
/**
@@ -132,7 +127,7 @@ public function saveOutput()
132127
*/
133128
public function processFiles($formatter)
134129
{
135-
$this->sass->setFormatter($this->getFormatterClass($formatter));
130+
$this->scss->setFormatter($this->getFormatterClass($formatter));
136131
$this->io->write("<info>use '{$formatter}' formatting</info>");
137132

138133
foreach ($this->files as $file) {
@@ -158,8 +153,8 @@ public function processFile(FileContainer $file)
158153
switch ($file->getType()) {
159154
case FileContainer::TYPE_SCSS:
160155
try {
161-
$this->sass->addImportPath(dirname($file->getInputPath()));
162-
$content = $this->sass->compile($file->getInputContent());
156+
$this->scss->addImportPath(dirname($file->getInputPath()));
157+
$content = $this->scss->compile($file->getInputContent());
163158

164159
return $file->setOutputContent($content);
165160
} catch (ParserException $e) {

0 commit comments

Comments
 (0)