@@ -72,7 +72,7 @@ public function isRestrictedClassNameUsage(
72
72
strtolower ($ classReflection ->getClassTypeDescription ()),
73
73
$ classReflection ->getDisplayName (),
74
74
),
75
- $ identifierPart ,
75
+ $ location -> createIdentifier ( $ identifierPart) ,
76
76
);
77
77
}
78
78
@@ -83,7 +83,7 @@ public function isRestrictedClassNameUsage(
83
83
$ classReflection ->getDisplayName (),
84
84
$ description ,
85
85
),
86
- $ identifierPart ,
86
+ $ location -> createIdentifier ( $ identifierPart) ,
87
87
);
88
88
}
89
89
@@ -96,7 +96,7 @@ public function isRestrictedClassNameUsage(
96
96
$ classReflection ->getDisplayName (),
97
97
$ description ,
98
98
),
99
- $ identifierPart ,
99
+ $ location -> createIdentifier ( $ identifierPart) ,
100
100
);
101
101
}
102
102
@@ -112,7 +112,7 @@ public function isRestrictedClassNameUsage(
112
112
strtolower ($ classReflection ->getClassTypeDescription ()),
113
113
$ classReflection ->getDisplayName (),
114
114
),
115
- $ identifierPart ,
115
+ $ location -> createIdentifier ( $ identifierPart) ,
116
116
);
117
117
}
118
118
@@ -123,7 +123,7 @@ public function isRestrictedClassNameUsage(
123
123
$ classReflection ->getDisplayName (),
124
124
$ description ,
125
125
),
126
- $ identifierPart ,
126
+ $ location -> createIdentifier ( $ identifierPart) ,
127
127
);
128
128
}
129
129
@@ -136,7 +136,7 @@ public function isRestrictedClassNameUsage(
136
136
$ classReflection ->getDisplayName (),
137
137
$ description ,
138
138
),
139
- $ identifierPart ,
139
+ $ location -> createIdentifier ( $ identifierPart) ,
140
140
);
141
141
}
142
142
@@ -153,7 +153,7 @@ public function isRestrictedClassNameUsage(
153
153
$ classReflection ->getDisplayName (),
154
154
$ description ,
155
155
),
156
- $ identifierPart ,
156
+ $ location -> createIdentifier ( $ identifierPart) ,
157
157
);
158
158
}
159
159
@@ -173,7 +173,7 @@ public function isRestrictedClassNameUsage(
173
173
);
174
174
}
175
175
176
- RestrictedUsage::create (
176
+ return RestrictedUsage::create (
177
177
$ location ->createMessage (
178
178
sprintf ('deprecated %s %s ' , strtolower ($ classReflection ->getClassTypeDescription ()), $ classReflection ->getDisplayName ()),
179
179
),
@@ -195,7 +195,7 @@ public function isRestrictedClassNameUsage(
195
195
);
196
196
}
197
197
198
- RestrictedUsage::create (
198
+ return RestrictedUsage::create (
199
199
$ location ->createMessage (
200
200
sprintf ('deprecated %s %s ' , strtolower ($ classReflection ->getClassTypeDescription ()), $ classReflection ->getDisplayName ()),
201
201
),
@@ -210,6 +210,8 @@ public function isRestrictedClassNameUsage(
210
210
return null ;
211
211
}
212
212
}
213
+
214
+ return $ defaultUsage ;
213
215
}
214
216
215
217
if ($ location ->value === ClassNameUsageLocation::STATIC_PROPERTY_ACCESS ) {
@@ -219,6 +221,8 @@ public function isRestrictedClassNameUsage(
219
221
return null ;
220
222
}
221
223
}
224
+
225
+ return $ defaultUsage ;
222
226
}
223
227
224
228
if ($ location ->value === ClassNameUsageLocation::CLASS_CONSTANT_ACCESS ) {
@@ -228,6 +232,8 @@ public function isRestrictedClassNameUsage(
228
232
return null ;
229
233
}
230
234
}
235
+
236
+ return $ defaultUsage ;
231
237
}
232
238
233
239
if (!$ this ->bleedingEdge ) {
0 commit comments