forked from MyIntervals/PHP-CSS-Parser
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRule.php
More file actions
25 lines (21 loc) · 939 Bytes
/
Copy pathRule.php
File metadata and controls
25 lines (21 loc) · 939 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<?php
declare(strict_types=1);
namespace Sabberworm\CSS\Rule;
use Sabberworm\CSS\Property\Declaration;
// @phpstan-ignore function.impossibleType
if (!\class_exists(Rule::class, false) && !\interface_exists(Rule::class, false)) {
/** @phpstan-ignore theCodingMachineSafe.function */
if (\class_alias(Declaration::class, Rule::class) === false) {
throw new \RuntimeException('Unexpected error');
}
// The test is expected to evaluate to false,
// but allows for the deprecation notice to be picked up by IDEs like PHPStorm.
// @phpstan-ignore booleanNot.alwaysTrue, booleanAnd.alwaysTrue, function.impossibleType
if (!\class_exists(Rule::class, false) && !\interface_exists(Rule::class, false)) {
/**
* @deprecated in v9.2, will be removed in v10.0. Use `Property\Declaration` instead, which is a direct
* replacement.
*/
class Rule {}
}
}