Code Duplication    Length = 10-10 lines in 2 locations

src/Core/Assets/Mixin.php 1 location

@@ 82-91 (lines=10) @@
79
     * @param string $component_name            
80
     * @param array $args            
81
     */
82
    public function __call(string $component_name, array $args)
83
    {
84
        if (! method_exists($this, $component_name)) {
85
            $this->{$component_name} = Closure::bind(function () use ($component_name) {
86
                return $this->component($component_name);
87
            }, $this, get_class());
88
        }
89
        
90
        return call_user_func($this->{$component_name}, $args);
91
    }
92
}
93

src/Core/Entity.php 1 location

@@ 190-199 (lines=10) @@
187
     * @param string $component_name            
188
     * @param array $args            
189
     */
190
    public function __call(string $component_name, array $args)
191
    {
192
        if (! method_exists($this, $component_name)) {
193
            $this->{$component_name} = Closure::bind(function () use ($component_name) {
194
                return $this->component($component_name);
195
            }, $this, get_class());
196
        }
197
        
198
        return call_user_func($this->{$component_name}, $args);
199
    }
200
201
    /**
202
     * Create and add DOM element of the entity