Skip to content

Commit a930575

Browse files
committed
Don't declare class if they already exist
1 parent b65729d commit a930575

File tree

1 file changed

+29
-15
lines changed

1 file changed

+29
-15
lines changed

classmap.php

Lines changed: 29 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -15,48 +15,62 @@
1515
/**
1616
* @deprecated since 0.1.0
1717
*/
18-
class scssc extends \Leafo\ScssPhp\Compiler
19-
{
18+
if ( ! class_exists( 'scssc') ) {
19+
class scssc extends \Leafo\ScssPhp\Compiler
20+
{
21+
}
2022
}
2123

2224
/**
2325
* @deprecated since 0.1.0
2426
*/
25-
class scss_parser extends \Leafo\ScssPhp\Parser
26-
{
27+
if ( ! class_exists( 'scss_parser') ) {
28+
class scss_parser extends \Leafo\ScssPhp\Parser
29+
{
30+
}
2731
}
2832

2933
/**
3034
* @deprecated since 0.1.0
3135
*/
32-
class scss_formatter extends \Leafo\ScssPhp\Formatter\Expanded
33-
{
36+
if ( ! class_exists( 'scss_formatter') ) {
37+
class scss_formatter extends \Leafo\ScssPhp\Formatter\Expanded
38+
{
39+
}
3440
}
3541

3642
/**
3743
* @deprecated since 0.1.0
3844
*/
39-
class scss_formatter_nested extends \Leafo\ScssPhp\Formatter\Nested
40-
{
45+
if ( ! class_exists( 'scss_formatter_nested') ) {
46+
class scss_formatter_nested extends \Leafo\ScssPhp\Formatter\Nested
47+
{
48+
}
4149
}
4250

4351
/**
4452
* @deprecated since 0.1.0
4553
*/
46-
class scss_formatter_compressed extends \Leafo\ScssPhp\Formatter\Compressed
47-
{
54+
if ( ! class_exists( 'scss_formatter_compressed' ) ) {
55+
class scss_formatter_compressed extends \Leafo\ScssPhp\Formatter\Compressed
56+
{
57+
}
4858
}
4959

5060
/**
5161
* @deprecated since 0.1.0
5262
*/
53-
class scss_formatter_crunched extends \Leafo\ScssPhp\Formatter\Crunched
54-
{
63+
if ( ! class_exists( 'scss_formatter_crunched') ) {
64+
class scss_formatter_crunched extends \Leafo\ScssPhp\Formatter\Crunched
65+
{
66+
}
5567
}
5668

5769
/**
5870
* @deprecated since 0.1.0
5971
*/
60-
class scss_server extends \Leafo\ScssPhp\Server
61-
{
62-
}
72+
if ( ! class_exists( 'scss_server') ) {
73+
class scss_server extends \Leafo\ScssPhp\Server
74+
{
75+
}
76+
}

0 commit comments

Comments
 (0)