@@ -72,7 +72,7 @@ public function isRestrictedClassNameUsage(
7272 strtolower ($ classReflection ->getClassTypeDescription ()),
7373 $ classReflection ->getDisplayName (),
7474 ),
75- $ identifierPart ,
75+ $ location -> createIdentifier ( $ identifierPart) ,
7676 );
7777 }
7878
@@ -83,7 +83,7 @@ public function isRestrictedClassNameUsage(
8383 $ classReflection ->getDisplayName (),
8484 $ description ,
8585 ),
86- $ identifierPart ,
86+ $ location -> createIdentifier ( $ identifierPart) ,
8787 );
8888 }
8989
@@ -96,7 +96,7 @@ public function isRestrictedClassNameUsage(
9696 $ classReflection ->getDisplayName (),
9797 $ description ,
9898 ),
99- $ identifierPart ,
99+ $ location -> createIdentifier ( $ identifierPart) ,
100100 );
101101 }
102102
@@ -112,7 +112,7 @@ public function isRestrictedClassNameUsage(
112112 strtolower ($ classReflection ->getClassTypeDescription ()),
113113 $ classReflection ->getDisplayName (),
114114 ),
115- $ identifierPart ,
115+ $ location -> createIdentifier ( $ identifierPart) ,
116116 );
117117 }
118118
@@ -123,7 +123,7 @@ public function isRestrictedClassNameUsage(
123123 $ classReflection ->getDisplayName (),
124124 $ description ,
125125 ),
126- $ identifierPart ,
126+ $ location -> createIdentifier ( $ identifierPart) ,
127127 );
128128 }
129129
@@ -136,7 +136,7 @@ public function isRestrictedClassNameUsage(
136136 $ classReflection ->getDisplayName (),
137137 $ description ,
138138 ),
139- $ identifierPart ,
139+ $ location -> createIdentifier ( $ identifierPart) ,
140140 );
141141 }
142142
@@ -153,7 +153,7 @@ public function isRestrictedClassNameUsage(
153153 $ classReflection ->getDisplayName (),
154154 $ description ,
155155 ),
156- $ identifierPart ,
156+ $ location -> createIdentifier ( $ identifierPart) ,
157157 );
158158 }
159159
@@ -173,7 +173,7 @@ public function isRestrictedClassNameUsage(
173173 );
174174 }
175175
176- RestrictedUsage::create (
176+ return RestrictedUsage::create (
177177 $ location ->createMessage (
178178 sprintf ('deprecated %s %s ' , strtolower ($ classReflection ->getClassTypeDescription ()), $ classReflection ->getDisplayName ()),
179179 ),
@@ -195,7 +195,7 @@ public function isRestrictedClassNameUsage(
195195 );
196196 }
197197
198- RestrictedUsage::create (
198+ return RestrictedUsage::create (
199199 $ location ->createMessage (
200200 sprintf ('deprecated %s %s ' , strtolower ($ classReflection ->getClassTypeDescription ()), $ classReflection ->getDisplayName ()),
201201 ),
@@ -210,6 +210,8 @@ public function isRestrictedClassNameUsage(
210210 return null ;
211211 }
212212 }
213+ 214+ return $ defaultUsage ;
213215 }
214216
215217 if ($ location ->value === ClassNameUsageLocation::STATIC_PROPERTY_ACCESS ) {
@@ -219,6 +221,8 @@ public function isRestrictedClassNameUsage(
219221 return null ;
220222 }
221223 }
224+ 225+ return $ defaultUsage ;
222226 }
223227
224228 if ($ location ->value === ClassNameUsageLocation::CLASS_CONSTANT_ACCESS ) {
@@ -228,6 +232,8 @@ public function isRestrictedClassNameUsage(
228232 return null ;
229233 }
230234 }
235+ 236+ return $ defaultUsage ;
231237 }
232238
233239 if (!$ this ->bleedingEdge ) {
0 commit comments