mirror of
https://github.com/barryvdh/laravel-ide-helper.git
synced 2026-08-18 01:57:13 +00:00
fix: Macro methods are duplicated registration.
This commit is contained in:
@@ -357,6 +357,7 @@ class Alias
|
||||
$properties = $reflection->getStaticProperties();
|
||||
$macros = isset($properties['macros']) ? $properties['macros'] : [];
|
||||
foreach ($macros as $macro_name => $macro_func) {
|
||||
if (!in_array($macro_name, $this->usedMethods)) {
|
||||
// Add macros
|
||||
$this->methods[] = new Macro(
|
||||
$this->getMacroFunction($macro_func),
|
||||
@@ -365,6 +366,8 @@ class Alias
|
||||
$macro_name,
|
||||
$this->interfaces
|
||||
);
|
||||
$this->usedMethods[] = $macro_name;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user