1 | <?php |
||
21 | class QuotedNode extends Node implements ComparableInterface |
||
22 | { |
||
23 | /** |
||
24 | * The content. |
||
25 | * |
||
26 | * @var string |
||
27 | */ |
||
28 | public $content; |
||
29 | |||
30 | /** |
||
31 | * The quote. |
||
32 | * |
||
33 | * @var string |
||
34 | */ |
||
35 | public $quote; |
||
36 | |||
37 | /** |
||
38 | * Current index. |
||
39 | * |
||
40 | * @var int |
||
41 | */ |
||
42 | public $index = 0; |
||
43 | |||
44 | /** |
||
45 | * Node type. |
||
46 | * |
||
47 | * @var string |
||
48 | */ |
||
49 | protected $type = 'Quoted'; |
||
50 | |||
51 | /** |
||
52 | * Escaped? |
||
53 | * |
||
54 | * @var bool |
||
55 | */ |
||
56 | public $escaped = false; |
||
57 | |||
58 | /** |
||
59 | * Constructor. |
||
60 | * |
||
61 | * @param string $string The quote |
||
62 | * @param string $content The string |
||
63 | * @param bool $escaped Is the string escaped? |
||
64 | * @param int $index Current index |
||
65 | * @param FileInfo $currentFileInfo The current file info |
||
66 | */ |
||
67 | public function __construct($string, $content = '', $escaped = false, $index = 0, FileInfo $currentFileInfo = null) |
||
77 | |||
78 | /** |
||
79 | * {@inheritdoc} |
||
80 | */ |
||
81 | public function generateCSS(Context $context, OutputInterface $output) |
||
93 | |||
94 | /** |
||
95 | * @return bool |
||
96 | */ |
||
97 | public function containsVariables() |
||
101 | |||
102 | /** |
||
103 | * Compiles the node. |
||
104 | * |
||
105 | * @param Context $context The context |
||
106 | * @param array|null $arguments Array of arguments |
||
107 | * @param bool|null $important Important flag |
||
108 | * |
||
109 | * @return QuotedNode |
||
110 | */ |
||
111 | public function compile(Context $context, $arguments = null, $important = null) |
||
147 | |||
148 | /** |
||
149 | * Compares with another node. |
||
150 | * |
||
151 | * @param Node $other |
||
152 | * |
||
153 | * @return int|null |
||
154 | */ |
||
155 | public function compare(Node $other) |
||
165 | } |
||
166 |
If a method or function can return multiple different values and unless you are sure that you only can receive a single value in this context, we recommend to add an additional type check:
If this a common case that PHP Analyzer should handle natively, please let us know by opening an issue.