@@ -223,7 +223,7 @@ protected function getDocBlock($method) : ?\phpDocumentor\Reflection\DocBlock
223
223
*/
224
224
225
225
$ comments = $ method ->getDocComment ();
226
- $ comments = \str_replace ('{@inheritdoc} ' , '@inheritdoc ' , $ comments );
226
+ $ comments = \str_ireplace ('{@inheritdoc} ' , '@inheritdoc ' , $ comments );
227
227
228
228
if (! $ comments )
229
229
{
@@ -261,14 +261,21 @@ protected function getInheritedSummary(\phpDocumentor\Reflection\DocBlock $docBl
261
261
$ tags = $ docBlock ->getTags ();
262
262
foreach ($ tags as $ index => $ tag )
263
263
{
264
- if (0 == \strcasecmp ($ tag ->getName (), 'inheritDoc ' ))
264
+ if (0 >= \stripos ($ tag ->getName (), 'inheritdoc ' ))
265
265
{
266
266
$ reflectionClass = $ reflectionMethod ->getDeclaringClass ();
267
267
$ parent = $ reflectionClass ->getParentClass ();
268
268
269
269
while ($ parent )
270
270
{
271
- $ method = $ parent ->getMethod ($ reflectionMethod ->name );
271
+ try
272
+ {
273
+ $ method = $ parent ->getMethod ($ reflectionMethod ->name );
274
+ }
275
+ catch (\Throwable $ e )
276
+ {
277
+ $ method = null ;
278
+ }
272
279
if ($ method )
273
280
{
274
281
$ docBlock = $ this ->getDocBlock ($ method );
@@ -292,14 +299,21 @@ protected function getInheritedDocBlock(array $tags, \ReflectionMethod $reflecti
292
299
{
293
300
foreach ($ tags as $ index => $ tag )
294
301
{
295
- if (0 == \strcasecmp ($ tag ->getName (), 'inheritDoc ' ))
302
+ if (0 >= \stripos ($ tag ->getName (), 'inheritdoc ' ))
296
303
{
297
304
$ reflectionClass = $ reflectionMethod ->getDeclaringClass ();
298
305
$ parent = $ reflectionClass ->getParentClass ();
299
306
300
307
while ($ parent )
301
308
{
302
- $ method = $ parent ->getMethod ($ reflectionMethod ->name );
309
+ try
310
+ {
311
+ $ method = $ parent ->getMethod ($ reflectionMethod ->name );
312
+ }
313
+ catch (\Throwable $ e )
314
+ {
315
+ $ method = null ;
316
+ }
303
317
if ($ method )
304
318
{
305
319
$ docBlock = $ this ->getDocBlock ($ method );
0 commit comments