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