@@ -53,7 +53,6 @@ class ContextSensitiveKeywords
53
53
const /* testMatch */ MATCH = 'MATCH ' ;
54
54
const /* testNamespace */ NAMESPACE = 'NAMESPACE ' ;
55
55
const /* testNew */ NEW = 'NEW ' ;
56
- const /* testParent */ PARENT = 'PARENT ' ;
57
56
const /* testPrint */ PRINT = 'PRINT ' ;
58
57
const /* testPrivate */ PRIVATE = 'PRIVATE ' ;
59
58
const /* testProtected */ PROTECTED = 'PROTECTED ' ;
@@ -62,7 +61,6 @@ class ContextSensitiveKeywords
62
61
const /* testRequire */ REQUIRE = 'REQUIRE ' ;
63
62
const /* testRequireOnce */ REQUIRE_ONCE = 'REQUIRE_ONCE ' ;
64
63
const /* testReturn */ RETURN = 'RETURN ' ;
65
- const /* testSelf */ SELF = 'SELF ' ;
66
64
const /* testStatic */ STATIC = 'STATIC ' ;
67
65
const /* testSwitch */ SWITCH = 'SWITCH ' ;
68
66
const /* testThrows */ THROW = 'THROW ' ;
@@ -78,10 +76,6 @@ class ContextSensitiveKeywords
78
76
const /* testAnd */ AND = 'LOGICAL_AND ' ;
79
77
const /* testOr */ OR = 'LOGICAL_OR ' ;
80
78
const /* testXor */ XOR = 'LOGICAL_XOR ' ;
81
-
82
- const /* testFalse */ FALSE = 'FALSE ' ,
83
- const /* testTrue */ TRUE = 'TRUE ' ,
84
- const /* testNull */ NULL = 'NULL ' ,
85
79
}
86
80
87
81
namespace /* testKeywordAfterNamespaceShouldBeString */ class ;
@@ -110,10 +104,6 @@ namespace /* testNamespaceNameIsString1 */ my\ /* testNamespaceNameIsString2 */
110
104
/* testFinalIsKeyword */ final /* testFunctionIsKeyword */ function someFunction (
111
105
/* testCallableIsKeyword */
112
106
callable $ callable ,
113
- /* testSelfIsKeyword */
114
- self $ self ,
115
- /* testParentIsKeyword */
116
- parent $ parent
117
107
) {
118
108
/* testReturnIsKeyword */
119
109
return $ this ;
@@ -220,45 +210,18 @@ $anonymousClass = new /* testAnonymousClassIsKeyword */ class {};
220
210
$ anonymousClass2 = new class /* testExtendsInAnonymousClassIsKeyword */ extends SomeParent {};
221
211
$ anonymousClass3 = new class /* testImplementsInAnonymousClassIsKeyword */ implements SomeInterface {};
222
212
223
- $ instantiated1 = new /* testClassInstantiationParentIsKeyword */ parent ();
224
- $ instantiated2 = new /* testClassInstantiationSelfIsKeyword */ SELF ;
225
- $ instantiated3 = new /* testClassInstantiationStaticIsKeyword */ static ($ param );
213
+ $ instantiated = new /* testClassInstantiationStaticIsKeyword */ static ($ param );
226
214
227
215
class Foo extends /* testNamespaceInNameIsKeyword */ namespace \Exception
228
216
{}
229
217
230
218
function /* testKeywordAfterFunctionShouldBeString */ eval () {}
231
219
function /* testKeywordAfterFunctionByRefShouldBeString */ &switch () {}
232
220
233
- function /* testKeywordSelfAfterFunctionByRefShouldBeString */ &self () {}
234
221
function /* testKeywordStaticAfterFunctionByRefShouldBeString */ &static () {}
235
- function /* testKeywordParentAfterFunctionByRefShouldBeString */ &parent () {}
236
- function /* testKeywordFalseAfterFunctionByRefShouldBeString */ &false () {}
237
- function /* testKeywordTrueAfterFunctionByRefShouldBeString */ & true () {}
238
- function /* testKeywordNullAfterFunctionByRefShouldBeString */ &NULL () {}
239
222
240
- /* testKeywordAsFunctionCallNameShouldBeStringSelf */ self ();
241
223
/* testKeywordAsFunctionCallNameShouldBeStringStatic */ static ();
242
224
$ obj -> /* testKeywordAsMethodCallNameShouldBeStringStatic */ static ();
243
- /* testKeywordAsFunctionCallNameShouldBeStringParent */ parent ();
244
- /* testKeywordAsFunctionCallNameShouldBeStringFalse */ false ();
245
- /* testKeywordAsFunctionCallNameShouldBeStringTrue */ True ();
246
- /* testKeywordAsFunctionCallNameShouldBeStringNull */ null /*comment*/ ();
247
-
248
- $ instantiated4 = new /* testClassInstantiationFalseIsString */ False ();
249
- $ instantiated5 = new /* testClassInstantiationTrueIsString */ true ();
250
- $ instantiated6 = new /* testClassInstantiationNullIsString */ null ();
251
225
252
226
$ function = /* testStaticIsKeywordBeforeClosure */ static function (/* testStaticIsKeywordWhenParamType */ static $ param ) {};
253
227
$ arrow = /* testStaticIsKeywordBeforeArrow */ static fn (): /* testStaticIsKeywordWhenReturnType */ static => 10 ;
254
-
255
- function standAloneFalseTrueNullTypesAndMore (
256
- /* testFalseIsKeywordAsParamType */ false $ paramA ,
257
- /* testTrueIsKeywordAsParamType */ true $ paramB ,
258
- /* testNullIsKeywordAsParamType */ null $ paramC ,
259
- ) /* testFalseIsKeywordAsReturnType */ false | /* testTrueIsKeywordAsReturnType */ true | /* testNullIsKeywordAsReturnType */ null {
260
- if ($ a === /* testFalseIsKeywordInComparison */ false
261
- || $ a === /* testTrueIsKeywordInComparison */ true
262
- || $ a === /* testNullIsKeywordInComparison */ null
263
- ) {}
264
- }
0 commit comments