Code Duplication    Length = 10-12 lines in 2 locations

Install.php 2 locations

@@ 23-32 (lines=10) @@
20
        self::unregister_from_cs();
21
    }
22
    
23
    static function register_in_cs() { 
24
        $installed_paths = self::get_installed_path();
25
        if (in_array(__DIR__, $installed_paths)) {
26
            echo "Our path is already registered in PHP CodeSniffer\n";
27
        } else {
28
            array_push($installed_paths, __DIR__);
29
            self::set_installed_path($installed_paths);
30
            echo "Registered our path in PHP CodeSniffer\n";
31
        }
32
    }
33
    
34
    static function unregister_from_cs() {
35
        $installed_paths = self::get_installed_path();
@@ 34-45 (lines=12) @@
31
        }
32
    }
33
    
34
    static function unregister_from_cs() {
35
        $installed_paths = self::get_installed_path();
36
        if (! in_array(__DIR__, $installed_paths)) {
37
            echo "Our path is not registered in PHP CodeSniffer\n";
38
        } else {
39
            $installed_paths = array_filter($installed_paths, function ($v) {
40
                return $v != __DIR__;
41
            });
42
            self::set_installed_path($installed_paths);
43
            echo "Unregistered our path in PHP CodeSniffer\n";
44
        }
45
    }
46
47
    static function make_copy() {
48
        $srcDir = __DIR__;