mirror of
https://github.com/barryvdh/laravel-ide-helper.git
synced 2026-08-21 19:43:10 +00:00
Fix generate error when macroable class has a "fake" method (#1066)
This commit is contained in:
@@ -16,6 +16,7 @@ All notable changes to this project will be documented in this file.
|
|||||||
### Fixed
|
### Fixed
|
||||||
- Compatibility with Lumen [\#1043 / mfn](https://github.com/barryvdh/laravel-ide-helper/pull/1043)
|
- 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)
|
- 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
|
2020-09-07, 2.8.1
|
||||||
-----------------
|
-----------------
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ use Barryvdh\Reflection\DocBlock\Serializer as DocBlockSerializer;
|
|||||||
use Barryvdh\Reflection\DocBlock\Tag\MethodTag;
|
use Barryvdh\Reflection\DocBlock\Tag\MethodTag;
|
||||||
use Closure;
|
use Closure;
|
||||||
use Illuminate\Config\Repository as ConfigRepository;
|
use Illuminate\Config\Repository as ConfigRepository;
|
||||||
|
use Illuminate\Support\Facades\Facade;
|
||||||
use ReflectionClass;
|
use ReflectionClass;
|
||||||
|
|
||||||
class Alias
|
class Alias
|
||||||
@@ -202,6 +203,10 @@ class Alias
|
|||||||
{
|
{
|
||||||
$facade = $this->facade;
|
$facade = $this->facade;
|
||||||
|
|
||||||
|
if (!is_subclass_of($facade, Facade::class)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (!method_exists($facade, 'fake')) {
|
if (!method_exists($facade, 'fake')) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user