diff --git a/src/Alias.php b/src/Alias.php index f14bb12..4e73da5 100644 --- a/src/Alias.php +++ b/src/Alias.php @@ -357,14 +357,17 @@ class Alias $properties = $reflection->getStaticProperties(); $macros = isset($properties['macros']) ? $properties['macros'] : []; foreach ($macros as $macro_name => $macro_func) { - // Add macros - $this->methods[] = new Macro( - $this->getMacroFunction($macro_func), - $this->alias, - $reflection, - $macro_name, - $this->interfaces - ); + if (!in_array($macro_name, $this->usedMethods)) { + // Add macros + $this->methods[] = new Macro( + $this->getMacroFunction($macro_func), + $this->alias, + $reflection, + $macro_name, + $this->interfaces + ); + $this->usedMethods[] = $macro_name; + } } } }