1 | <?php declare(strict_types=1); |
||
17 | class Category extends RuleAbstract |
||
18 | { |
||
19 | const NODE_NAME = 'category'; |
||
20 | |||
21 | /** |
||
22 | * @param NodeInterface $node |
||
23 | * @param \DOMElement $element |
||
24 | * @return mixed |
||
25 | */ |
||
26 | 2 | public function setProperty(NodeInterface $node, \DOMElement $element) : void |
|
34 | |||
35 | /** |
||
36 | * @inheritDoc |
||
37 | */ |
||
38 | 4 | protected function hasValue(NodeInterface $node) : bool |
|
42 | |||
43 | /** |
||
44 | * @inheritDoc |
||
45 | */ |
||
46 | 4 | protected function addElement(\DomDocument $document, \DOMElement $rootElement, NodeInterface $node) : void |
|
52 | |||
53 | /** |
||
54 | * @param \DomDocument $document |
||
55 | * @param CategoryInterface $category |
||
56 | * @return \DomElement |
||
57 | */ |
||
58 | 4 | public function createCategoryElement(\DomDocument $document, CategoryInterface $category) : \DOMElement |
|
70 | } |
||
71 |
In PHP, under loose comparison (like
==
, or!=
, orswitch
conditions), values of different types might be equal.For
string
values, the empty string''
is a special case, in particular the following results might be unexpected: