GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

Scss::compile()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 7
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 5
nc 1
nop 0
1
<?php declare(strict_types=1);
2
////////////////////////////////////////////////////////////////////////////////
3
// __________ __             ________                   __________
4
// \______   \  |__ ______  /  _____/  ____ _____ ______\______   \ _______  ___
5
//  |     ___/  |  \\____ \/   \  ____/ __ \\__  \\_  __ \    |  _//  _ \  \/  /
6
//  |    |   |   Y  \  |_> >    \_\  \  ___/ / __ \|  | \/    |   (  <_> >    <
7
//  |____|   |___|  /   __/ \______  /\___  >____  /__|  |______  /\____/__/\_ \
8
//                \/|__|           \/     \/     \/             \/            \/
9
// -----------------------------------------------------------------------------
10
//          Designed and Developed by Brad Jones <brad @="bjc.id.au" />
11
// -----------------------------------------------------------------------------
12
////////////////////////////////////////////////////////////////////////////////
13
14
namespace Gears\Asset\Compilers;
15
16
use Gears\Asset\Compilers\Css;
17
use Leafo\ScssPhp\Compiler as Scss_Parser;
18
19
/**
20
 * Compilies Sass into css before returning control to the parent Css Compiler.
21
 *
22
 * > NOTE: This only caters for ```scss``` files not ```sass``` files.
23
 */
24
class Scss extends Css
25
{
26
    public function compile(): string
27
    {
28
        $parser = new Scss_Parser();
29
        $parser->addImportPath($this->file->getPath());
30
        $this->source = $parser->compile($this->source);
31
        return parent::compile();
32
    }
33
}
34