File tree Expand file tree Collapse file tree 3 files changed +9
-28
lines changed
app/code/Magento/PageBuilder Expand file tree Collapse file tree 3 files changed +9
-28
lines changed Original file line number Diff line number Diff line change @@ -55,12 +55,9 @@ private function convertTypes(\DOMDocument $source): array
55
55
/** @var \DOMNode $contentType */
56
56
foreach ($ contentTypes as $ contentType ) {
57
57
$ name = $ contentType ->attributes ->getNamedItem ('name ' )->nodeValue ;
58
- /** @var \DOMElement $key */
59
- /** @var \DOMElement $value */
60
- foreach ($ contentType ->attributes as $ key => $ value ) {
61
- $ typesData [$ name ][$ key ] = $ contentType ->hasAttribute ($ key )
62
- ? $ contentType ->attributes ->getNamedItem ($ key )->nodeValue
63
- : null ;
58
+ /** @var \DOMElement $attributeValue */
59
+ foreach ($ contentType ->attributes as $ attributeName => $ attributeValue ) {
60
+ $ typesData [$ name ][$ attributeName ] = $ attributeValue ->nodeValue ;
64
61
}
65
62
/** @var \DOMElement $childNode */
66
63
foreach ($ contentType ->childNodes as $ childNode ) {
Original file line number Diff line number Diff line change @@ -39,11 +39,9 @@ private function convertGroups(\DOMDocument $source): array
39
39
foreach ($ groups ->item (0 )->childNodes as $ group ) {
40
40
if ($ group ->nodeType == XML_ELEMENT_NODE && $ group ->tagName == 'group ' ) {
41
41
$ name = $ group ->attributes ->getNamedItem ('name ' )->nodeValue ;
42
- /** @var \DOMElement $childNode */
43
- foreach ($ group ->attributes as $ key => $ value ) {
44
- $ groupsData [$ name ][$ key ] = $ group ->hasAttribute ($ key )
45
- ? $ group ->attributes ->getNamedItem ($ key )->nodeValue
46
- : null ;
42
+ /** @var \DOMElement $attributeValue */
43
+ foreach ($ group ->attributes as $ attributeName => $ attributeValue ) {
44
+ $ groupsData [$ name ][$ attributeName ] = $ attributeValue ->nodeValue ;
47
45
}
48
46
}
49
47
}
@@ -53,18 +51,4 @@ private function convertGroups(\DOMDocument $source): array
53
51
54
52
return $ groupsData ;
55
53
}
56
-
57
- /**
58
- * Check if node is configuration node
59
- *
60
- * @param \DOMNode $node
61
- * @return bool
62
- */
63
- private function isConfigNode (\DOMNode $ node ): bool
64
- {
65
- return $ node ->nodeType === XML_ELEMENT_NODE
66
- || ($ node ->nodeType === XML_CDATA_SECTION_NODE
67
- || $ node ->nodeType === XML_TEXT_NODE
68
- && trim ($ node ->nodeValue ) !== '' );
69
- }
70
54
}
Original file line number Diff line number Diff line change 159
159
<xs : attribute type =" xs:string" name =" virtual" use =" optional" />
160
160
</xs : complexType >
161
161
<xs : complexType name =" static_property" >
162
- <xs : attribute type =" xs:string" name =" source" use =" optional " />
162
+ <xs : attribute type =" xs:string" name =" source" use =" required " />
163
163
<xs : attribute type =" xs:string" name =" value" use =" optional" />
164
164
</xs : complexType >
165
165
<xs : complexType name =" attributes" >
186
186
<xs : attribute type =" xs:boolean" name =" persist" use =" optional" />
187
187
</xs : complexType >
188
188
<xs : complexType name =" static_attribute" >
189
- <xs : attribute type =" xs:string" name =" source" use =" optional " />
189
+ <xs : attribute type =" xs:string" name =" source" use =" required " />
190
190
<xs : attribute type =" xs:string" name =" value" use =" optional" />
191
191
</xs : complexType >
192
192
<xs : complexType name =" html" >
207
207
</xs : sequence >
208
208
</xs : complexType >
209
209
<xs : complexType name =" class" >
210
- <xs : attribute type =" xs:string" name =" source" use =" optional " />
210
+ <xs : attribute type =" xs:string" name =" source" use =" required " />
211
211
</xs : complexType >
212
212
<xs : complexType name =" tag" >
213
213
<xs : attribute type =" xs:string" name =" name" use =" required" />
You can’t perform that action at this time.
0 commit comments