Code Duplication    Length = 8-9 lines in 2 locations

src/Hacks.php 2 locations

@@ 19-27 (lines=9) @@
16
     * @param string $method
17
     * @param string $wrap
18
     */
19
    public static function addWrapperMethodToInstance($instance, $method, $wrap)
20
    {
21
        // hasMethod() trigger the population of $extra_methods
22
        $instance->hasMethod('UnexistentMethod');
23
        self::$extra_methods[get_class($instance)][strtolower($method)] = [
24
            'wrap'   => $wrap,
25
            'method' => $method,
26
        ];
27
    }
28
29
    public static function addCallbackMethodToInstance($instance, $method, $callback)
30
    {
@@ 29-36 (lines=8) @@
26
        ];
27
    }
28
29
    public static function addCallbackMethodToInstance($instance, $method, $callback)
30
    {
31
        // hasMethod() trigger the population of $extra_methods
32
        $instance->hasMethod('UnexistentMethod');
33
        self::$extra_methods[get_class($instance)][strtolower($method)] = [
34
            'callback' => $callback,
35
        ];
36
    }
37
}
38