Skip to content

Commit 244aa96

Browse files
committed
make VERSION a const
1 parent b4f8534 commit 244aa96

File tree

4 files changed

+6
-5
lines changed

4 files changed

+6
-5
lines changed

bin/pscss

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ include 'scss.inc.php';
77

88
use Leafo\ScssPhp\Compiler;
99
use Leafo\ScssPhp\Parser;
10+
use Leafo\ScssPhp\Version;
1011

1112
$opts = getopt('hvTf:', array('help', 'version'));
1213

@@ -40,7 +41,7 @@ EOT;
4041
}
4142

4243
if (has("v", "version")) {
43-
exit(Compiler::$VERSION . "\n");
44+
exit(Version::VERSION . "\n");
4445
}
4546

4647
$data = "";

scss.inc.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,6 @@
77
include_once __DIR__ . '/src/Formatter/Expanded.php';
88
include_once __DIR__ . '/src/Formatter/Nested.php';
99
include_once __DIR__ . '/src/Parser.php';
10+
include_once __DIR__ . '/src/Version.php';
1011
include_once __DIR__ . '/src/Server.php';
1112
include_once __DIR__ . '/classmap.php';

src/Compiler.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,6 @@
4949
*/
5050
class Compiler
5151
{
52-
static public $VERSION = 'v0.1.1';
53-
5452
static protected $operatorNames = array(
5553
'+' => 'add',
5654
'-' => 'sub',

src/Server.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
namespace Leafo\ScssPhp;
1414

1515
use Leafo\ScssPhp\Compiler;
16+
use Leafo\ScssPhp\Version;
1617

1718
/**
1819
* SCSS server
@@ -186,7 +187,7 @@ protected function compile($in, $out)
186187
$css = $this->scss->compile(file_get_contents($in), $in);
187188
$elapsed = round((microtime(true) - $start), 4);
188189

189-
$v = Compiler::$VERSION;
190+
$v = Version::VERSION;
190191
$t = @date('r');
191192
$css = "/* compiled by scssphp $v on $t (${elapsed}s) */\n\n" . $css;
192193
$etag = md5($css);
@@ -313,7 +314,7 @@ public function serve($salt = '')
313314
header($protocol . ' 404 Not Found');
314315
header('Content-type: text/plain');
315316

316-
$v = Compiler::$VERSION;
317+
$v = Version::VERSION;
317318
echo "/* INPUT NOT FOUND scss $v */\n";
318319
}
319320

0 commit comments

Comments
 (0)