@@ -24,7 +24,7 @@ class Sql2Generator extends BaseSqlGenerator
2424 * @param string|null $selectorName The selector name. If it is different than
2525 * the nodeTypeName, the alias is declared.
2626 */
27- public function evalSelector (string $ nodeTypeName , string $ selectorName = null ): string
27+ public function evalSelector (string $ nodeTypeName , ? string $ selectorName = null ): string
2828 {
2929 $ sql2 = $ this ->addBracketsIfNeeded ($ nodeTypeName );
3030
@@ -83,7 +83,7 @@ public function evalEquiJoinCondition(string $sel1Name, string $prop1Name, strin
8383 * [',' selector2Path] ')'
8484 * selector2Path ::= Path.
8585 */
86- public function evalSameNodeJoinCondition (string $ sel1Name , string $ sel2Name , string $ sel2Path = null ): string
86+ public function evalSameNodeJoinCondition (string $ sel1Name , string $ sel2Name , ? string $ sel2Path = null ): string
8787 {
8888 $ sql2 = 'ISSAMENODE( '
8989 .$ this ->addBracketsIfNeeded ($ sel1Name ).', '
@@ -127,7 +127,7 @@ public function evalDescendantNodeJoinCondition(string $descendantSelectorName,
127127 /**
128128 * SameNode ::= 'ISSAMENODE(' [selectorName ','] Path ')'.
129129 */
130- public function evalSameNode (string $ path , string $ selectorName = null ): string
130+ public function evalSameNode (string $ path , ? string $ selectorName = null ): string
131131 {
132132 $ sql2 = 'ISSAMENODE( ' ;
133133 $ sql2 .= null === $ selectorName ? $ path : $ this ->addBracketsIfNeeded ($ selectorName ).', ' .$ path ;
@@ -139,7 +139,7 @@ public function evalSameNode(string $path, string $selectorName = null): string
139139 /**
140140 * SameNode ::= 'ISCHILDNODE(' [selectorName ','] Path ')'.
141141 */
142- public function evalChildNode (string $ path , string $ selectorName = null ): string
142+ public function evalChildNode (string $ path , ? string $ selectorName = null ): string
143143 {
144144 $ sql2 = 'ISCHILDNODE( ' ;
145145 $ sql2 .= null === $ selectorName ? $ path : $ this ->addBracketsIfNeeded ($ selectorName ).', ' .$ path ;
@@ -151,7 +151,7 @@ public function evalChildNode(string $path, string $selectorName = null): string
151151 /**
152152 * SameNode ::= 'ISDESCENDANTNODE(' [selectorName ','] Path ')'.
153153 */
154- public function evalDescendantNode (string $ path , string $ selectorName = null ): string
154+ public function evalDescendantNode (string $ path , ? string $ selectorName = null ): string
155155 {
156156 $ sql2 = 'ISDESCENDANTNODE( ' ;
157157 $ sql2 .= null === $ selectorName ? $ path : $ this ->addBracketsIfNeeded ($ selectorName ).', ' .$ path ;
@@ -179,7 +179,7 @@ public function evalPropertyExistence(?string $selectorName, string $propertyNam
179179 * FullTextSearchExpression ')'
180180 * FullTextSearchExpression ::= BindVariable | ''' FullTextSearchLiteral '''.
181181 */
182- public function evalFullTextSearch (string $ selectorName , string $ searchExpression , string $ propertyName = null ): string
182+ public function evalFullTextSearch (string $ selectorName , string $ searchExpression , ? string $ propertyName = null ): string
183183 {
184184 $ propertyName = $ propertyName ?: '* ' ;
185185
@@ -201,31 +201,31 @@ public function evalLength(string $propertyValue): string
201201 /**
202202 * NodeName ::= 'NAME(' [selectorName] ')'.
203203 */
204- public function evalNodeName (string $ selectorValue = null ): string
204+ public function evalNodeName (? string $ selectorValue = null ): string
205205 {
206206 return "NAME( $ selectorValue) " ;
207207 }
208208
209209 /**
210210 * NodeLocalName ::= 'LOCALNAME(' [selectorName] ')'.
211211 */
212- public function evalNodeLocalName (string $ selectorValue = null ): string
212+ public function evalNodeLocalName (? string $ selectorValue = null ): string
213213 {
214214 return "LOCALNAME( $ selectorValue) " ;
215215 }
216216
217217 /**
218218 * FullTextSearchScore ::= 'SCORE(' [selectorName] ')'.
219219 */
220- public function evalFullTextSearchScore (string $ selectorValue = null ): string
220+ public function evalFullTextSearchScore (? string $ selectorValue = null ): string
221221 {
222222 return "SCORE( $ selectorValue) " ;
223223 }
224224
225225 /**
226226 * PropertyValue ::= [selectorName'.'] propertyName // If only one selector exists.
227227 */
228- public function evalPropertyValue (string $ propertyName , string $ selectorName = null ): string
228+ public function evalPropertyValue (string $ propertyName , ? string $ selectorName = null ): string
229229 {
230230 $ sql2 = null !== $ selectorName ? $ this ->addBracketsIfNeeded ($ selectorName ).'. ' : '' ;
231231 if ('* ' !== $ propertyName && !str_starts_with ($ propertyName , '[ ' )) {
@@ -267,7 +267,7 @@ public function evalColumns(iterable $columns): string
267267 * propertyName ::= Name
268268 * columnName ::= Name.
269269 */
270- public function evalColumn (string $ selectorName , string $ propertyName = null , string $ colname = null ): string
270+ public function evalColumn (string $ selectorName , ? string $ propertyName = null , ? string $ colname = null ): string
271271 {
272272 $ sql2 = '' ;
273273 if (null !== $ selectorName && null === $ propertyName && null === $ colname ) {
0 commit comments