File tree Expand file tree Collapse file tree 3 files changed +21
-1
lines changed Expand file tree Collapse file tree 3 files changed +21
-1
lines changed Original file line number Diff line number Diff line change @@ -71,6 +71,16 @@ public function getExpressions(): array
71
71
return $ this ->expressions ;
72
72
}
73
73
74
+ /**
75
+ * Returns whether this list is empty.
76
+ *
77
+ * @return bool
78
+ */
79
+ public function isEmpty (): bool
80
+ {
81
+ return empty ($ this ->expressions );
82
+ }
83
+
74
84
/**
75
85
* @inheritDoc
76
86
*/
Original file line number Diff line number Diff line change @@ -88,6 +88,16 @@ public function getElements(): array
88
88
return $ this ->elements ;
89
89
}
90
90
91
+ /**
92
+ * Checks if this map is empty
93
+ *
94
+ * @return bool
95
+ */
96
+ public function isEmpty (): bool
97
+ {
98
+ return empty ($ this ->elements );
99
+ }
100
+
91
101
/**
92
102
* @inheritDoc
93
103
*/
Original file line number Diff line number Diff line change @@ -150,7 +150,7 @@ private function nodeInnerToString(): string
150
150
}
151
151
}
152
152
153
- if (isset ($ this ->properties )) {
153
+ if (isset ($ this ->properties ) && ! $ this -> properties -> isEmpty () ) {
154
154
if ($ nodeInner !== "" ) {
155
155
$ nodeInner .= " " ;
156
156
}
You can’t perform that action at this time.
0 commit comments