Skip to content

Commit

Permalink
MDL-65761 lib: Update scssphp to 1.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Chocolate-lightning committed Jul 16, 2019
1 parent 358d571 commit f619e30
Show file tree
Hide file tree
Showing 35 changed files with 993 additions and 272 deletions.
4 changes: 2 additions & 2 deletions lib/adminlib.php
Expand Up @@ -10861,9 +10861,9 @@ public function validate($data) {
$scss = new core_scss();
try {
$scss->compile($data);
} catch (Leafo\ScssPhp\Exception\ParserException $e) {
} catch (ScssPhp\ScssPhp\Exception\ParserException $e) {
return get_string('scssinvalid', 'admin', $e->getMessage());
} catch (Leafo\ScssPhp\Exception\CompilerException $e) {
} catch (ScssPhp\ScssPhp\Exception\CompilerException $e) {
// Silently ignore this - it could be a scss variable defined from somewhere
// else which we are not examining here.
return true;
Expand Down
2 changes: 1 addition & 1 deletion lib/classes/component.php
Expand Up @@ -80,7 +80,7 @@ class core_component {
'GeoIp2' => 'lib/maxmind/GeoIp2',
'Sabberworm\\CSS' => 'lib/php-css-parser',
'MoodleHQ\\RTLCSS' => 'lib/rtlcss',
'Leafo\\ScssPhp' => 'lib/scssphp',
'ScssPhp\\ScssPhp' => 'lib/scssphp',
'Box\\Spout' => 'lib/spout/src/Spout',
'MatthiasMullie\\Minify' => 'lib/minify/matthiasmullie-minify/src/',
'MatthiasMullie\\PathConverter' => 'lib/minify/matthiasmullie-pathconverter/src/',
Expand Down
10 changes: 5 additions & 5 deletions lib/classes/scss.php
Expand Up @@ -31,7 +31,7 @@
* @copyright 2016 Frédéric Massart
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class core_scss extends \Leafo\ScssPhp\Compiler {
class core_scss extends \ScssPhp\ScssPhp\Compiler {

/** @var string The path to the SCSS file. */
protected $scssfile;
Expand Down Expand Up @@ -150,14 +150,14 @@ public function compile($code, $path = null) {
* Compile child; returns a value to halt execution
*
* @param array $child
* @param \Leafo\ScssPhp\Formatter\OutputBlock $out
* @param \ScssPhp\ScssPhp\Formatter\OutputBlock $out
*
* @return array|null
*/
protected function compileChild($child, \Leafo\ScssPhp\Formatter\OutputBlock $out) {
protected function compileChild($child, \ScssPhp\ScssPhp\Formatter\OutputBlock $out) {
switch($child[0]) {
case \Leafo\ScssPhp\Type::T_SCSSPHP_IMPORT_ONCE:
case \Leafo\ScssPhp\Type::T_IMPORT:
case \ScssPhp\ScssPhp\Type::T_SCSSPHP_IMPORT_ONCE:
case \ScssPhp\ScssPhp\Type::T_IMPORT:
list(, $rawpath) = $child;
$rawpath = $this->reduce($rawpath);
$path = $this->compileStringContent($rawpath);
Expand Down
6 changes: 3 additions & 3 deletions lib/scssphp/Base/Range.php
Expand Up @@ -2,14 +2,14 @@
/**
* SCSSPHP
*
* @copyright 2015-2018 Leaf Corcoran
* @copyright 2015-2019 Leaf Corcoran
*
* @license http://opensource.org/licenses/MIT MIT
*
* @link http://leafo.github.io/scssphp
* @link http://scssphp.github.io/scssphp
*/

namespace Leafo\ScssPhp\Base;
namespace ScssPhp\ScssPhp\Base;

/**
* Range
Expand Down
10 changes: 5 additions & 5 deletions lib/scssphp/Block.php
Expand Up @@ -2,14 +2,14 @@
/**
* SCSSPHP
*
* @copyright 2012-2018 Leaf Corcoran
* @copyright 2012-2019 Leaf Corcoran
*
* @license http://opensource.org/licenses/MIT MIT
*
* @link http://leafo.github.io/scssphp
* @link http://scssphp.github.io/scssphp
*/

namespace Leafo\ScssPhp;
namespace ScssPhp\ScssPhp;

/**
* Block
Expand All @@ -24,7 +24,7 @@ class Block
public $type;

/**
* @var \Leafo\ScssPhp\Block
* @var \ScssPhp\ScssPhp\Block
*/
public $parent;

Expand Down Expand Up @@ -64,7 +64,7 @@ class Block
public $children;

/**
* @var \Leafo\ScssPhp\Block
* @var \ScssPhp\ScssPhp\Block
*/
public $selfParent;
}
6 changes: 3 additions & 3 deletions lib/scssphp/Cache.php
Expand Up @@ -2,14 +2,14 @@
/**
* SCSSPHP
*
* @copyright 2012-2018 Leaf Corcoran
* @copyright 2012-2019 Leaf Corcoran
*
* @license http://opensource.org/licenses/MIT MIT
*
* @link http://leafo.github.io/scssphp
* @link http://scssphp.github.io/scssphp
*/

namespace Leafo\ScssPhp;
namespace ScssPhp\ScssPhp;

use Exception;

Expand Down
6 changes: 3 additions & 3 deletions lib/scssphp/Colors.php
Expand Up @@ -2,14 +2,14 @@
/**
* SCSSPHP
*
* @copyright 2012-2018 Leaf Corcoran
* @copyright 2012-2019 Leaf Corcoran
*
* @license http://opensource.org/licenses/MIT MIT
*
* @link http://leafo.github.io/scssphp
* @link http://scssphp.github.io/scssphp
*/

namespace Leafo\ScssPhp;
namespace ScssPhp\ScssPhp;

/**
* CSS Colors
Expand Down

0 comments on commit f619e30

Please sign in to comment.