From 93630fdf6239555f730884c68cebc76930183928 Mon Sep 17 00:00:00 2001 From: Jeppe Knockaert Date: Thu, 24 May 2018 11:41:22 +0200 Subject: [PATCH] Only skip non-models when generating docs The fix made in PR https://github.com/barryvdh/laravel-ide-helper/pull/614 for issue https://github.com/barryvdh/laravel-ide-helper/issues/253 was incorrect as it resulted in comments no longer being generated for Models that are not Pivot Rlations. This PR allow comments to be generated for both Pivot Models (as they are a subclass of Eloquent\Model) and normal Models. --- src/Console/ModelsCommand.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Console/ModelsCommand.php b/src/Console/ModelsCommand.php index c6ace3d..0f8e97c 100644 --- a/src/Console/ModelsCommand.php +++ b/src/Console/ModelsCommand.php @@ -187,8 +187,7 @@ class ModelsCommand extends Command // handle abstract classes, interfaces, ... $reflectionClass = new \ReflectionClass($name); - if (!$reflectionClass->isSubclassOf('Illuminate\Database\Eloquent\Model') - || !$reflectionClass->isSubclassOf('Illuminate\Database\Eloquent\Relations\Pivot')) { + if (!$reflectionClass->isSubclassOf('Illuminate\Database\Eloquent\Model')) { continue; }