Fix generate error when macroable class has a "fake" method (#1066)

This commit is contained in:
domkrm
2020-09-21 16:26:32 +02:00
committed by GitHub
parent 1044f466e9
commit 0168e7256b
2 changed files with 6 additions and 0 deletions
+1
View File
@@ -16,6 +16,7 @@ All notable changes to this project will be documented in this file.
### Fixed
- Compatibility with Lumen [\#1043 / mfn](https://github.com/barryvdh/laravel-ide-helper/pull/1043)
- Allow model_locations to have glob patterns [\#1059 / saackearl](https://github.com/barryvdh/laravel-ide-helper/pull/1059)
- Error when generating helper for macroable classes which are not facades and contain a "fake" method [\#1066 / domkrm] (https://github.com/barryvdh/laravel-ide-helper/pull/1066)
2020-09-07, 2.8.1
-----------------
+5
View File
@@ -17,6 +17,7 @@ use Barryvdh\Reflection\DocBlock\Serializer as DocBlockSerializer;
use Barryvdh\Reflection\DocBlock\Tag\MethodTag;
use Closure;
use Illuminate\Config\Repository as ConfigRepository;
use Illuminate\Support\Facades\Facade;
use ReflectionClass;
class Alias
@@ -202,6 +203,10 @@ class Alias
{
$facade = $this->facade;
if (!is_subclass_of($facade, Facade::class)) {
return;
}
if (!method_exists($facade, 'fake')) {
return;
}