@@ -24,7 +24,7 @@ class Sql2Generator extends BaseSqlGenerator
24
24
* @param string|null $selectorName The selector name. If it is different than
25
25
* the nodeTypeName, the alias is declared.
26
26
*/
27
- public function evalSelector (string $ nodeTypeName , string $ selectorName = null ): string
27
+ public function evalSelector (string $ nodeTypeName , ? string $ selectorName = null ): string
28
28
{
29
29
$ sql2 = $ this ->addBracketsIfNeeded ($ nodeTypeName );
30
30
@@ -83,7 +83,7 @@ public function evalEquiJoinCondition(string $sel1Name, string $prop1Name, strin
83
83
* [',' selector2Path] ')'
84
84
* selector2Path ::= Path.
85
85
*/
86
- public function evalSameNodeJoinCondition (string $ sel1Name , string $ sel2Name , string $ sel2Path = null ): string
86
+ public function evalSameNodeJoinCondition (string $ sel1Name , string $ sel2Name , ? string $ sel2Path = null ): string
87
87
{
88
88
$ sql2 = 'ISSAMENODE( '
89
89
.$ this ->addBracketsIfNeeded ($ sel1Name ).', '
@@ -127,7 +127,7 @@ public function evalDescendantNodeJoinCondition(string $descendantSelectorName,
127
127
/**
128
128
* SameNode ::= 'ISSAMENODE(' [selectorName ','] Path ')'.
129
129
*/
130
- public function evalSameNode (string $ path , string $ selectorName = null ): string
130
+ public function evalSameNode (string $ path , ? string $ selectorName = null ): string
131
131
{
132
132
$ sql2 = 'ISSAMENODE( ' ;
133
133
$ sql2 .= null === $ selectorName ? $ path : $ this ->addBracketsIfNeeded ($ selectorName ).', ' .$ path ;
@@ -139,7 +139,7 @@ public function evalSameNode(string $path, string $selectorName = null): string
139
139
/**
140
140
* SameNode ::= 'ISCHILDNODE(' [selectorName ','] Path ')'.
141
141
*/
142
- public function evalChildNode (string $ path , string $ selectorName = null ): string
142
+ public function evalChildNode (string $ path , ? string $ selectorName = null ): string
143
143
{
144
144
$ sql2 = 'ISCHILDNODE( ' ;
145
145
$ sql2 .= null === $ selectorName ? $ path : $ this ->addBracketsIfNeeded ($ selectorName ).', ' .$ path ;
@@ -151,7 +151,7 @@ public function evalChildNode(string $path, string $selectorName = null): string
151
151
/**
152
152
* SameNode ::= 'ISDESCENDANTNODE(' [selectorName ','] Path ')'.
153
153
*/
154
- public function evalDescendantNode (string $ path , string $ selectorName = null ): string
154
+ public function evalDescendantNode (string $ path , ? string $ selectorName = null ): string
155
155
{
156
156
$ sql2 = 'ISDESCENDANTNODE( ' ;
157
157
$ sql2 .= null === $ selectorName ? $ path : $ this ->addBracketsIfNeeded ($ selectorName ).', ' .$ path ;
@@ -179,7 +179,7 @@ public function evalPropertyExistence(?string $selectorName, string $propertyNam
179
179
* FullTextSearchExpression ')'
180
180
* FullTextSearchExpression ::= BindVariable | ''' FullTextSearchLiteral '''.
181
181
*/
182
- public function evalFullTextSearch (string $ selectorName , string $ searchExpression , string $ propertyName = null ): string
182
+ public function evalFullTextSearch (string $ selectorName , string $ searchExpression , ? string $ propertyName = null ): string
183
183
{
184
184
$ propertyName = $ propertyName ?: '* ' ;
185
185
@@ -201,31 +201,31 @@ public function evalLength(string $propertyValue): string
201
201
/**
202
202
* NodeName ::= 'NAME(' [selectorName] ')'.
203
203
*/
204
- public function evalNodeName (string $ selectorValue = null ): string
204
+ public function evalNodeName (? string $ selectorValue = null ): string
205
205
{
206
206
return "NAME( $ selectorValue) " ;
207
207
}
208
208
209
209
/**
210
210
* NodeLocalName ::= 'LOCALNAME(' [selectorName] ')'.
211
211
*/
212
- public function evalNodeLocalName (string $ selectorValue = null ): string
212
+ public function evalNodeLocalName (? string $ selectorValue = null ): string
213
213
{
214
214
return "LOCALNAME( $ selectorValue) " ;
215
215
}
216
216
217
217
/**
218
218
* FullTextSearchScore ::= 'SCORE(' [selectorName] ')'.
219
219
*/
220
- public function evalFullTextSearchScore (string $ selectorValue = null ): string
220
+ public function evalFullTextSearchScore (? string $ selectorValue = null ): string
221
221
{
222
222
return "SCORE( $ selectorValue) " ;
223
223
}
224
224
225
225
/**
226
226
* PropertyValue ::= [selectorName'.'] propertyName // If only one selector exists.
227
227
*/
228
- public function evalPropertyValue (string $ propertyName , string $ selectorName = null ): string
228
+ public function evalPropertyValue (string $ propertyName , ? string $ selectorName = null ): string
229
229
{
230
230
$ sql2 = null !== $ selectorName ? $ this ->addBracketsIfNeeded ($ selectorName ).'. ' : '' ;
231
231
if ('* ' !== $ propertyName && !str_starts_with ($ propertyName , '[ ' )) {
@@ -267,7 +267,7 @@ public function evalColumns(iterable $columns): string
267
267
* propertyName ::= Name
268
268
* columnName ::= Name.
269
269
*/
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
271
271
{
272
272
$ sql2 = '' ;
273
273
if (null !== $ selectorName && null === $ propertyName && null === $ colname ) {
0 commit comments