Code Duplication    Length = 13-13 lines in 2 locations

src/ComposerScripts.php 2 locations

@@ 124-136 (lines=13) @@
121
        static::updateComposer($root, $camel_case);
122
    }
123
124
    protected static function configApp($root, $camel_case)
125
    {
126
        $file = $root.'/bootstrap/app.php';
127
        if(file_exists($file)) {
128
            $contents = file_get_contents($file);
129
            $contents = str_replace('WPB_APP_ROOT', strtoupper($camel_case).'_APP_ROOT', $contents);
130
            file_put_contents(
131
                $file,
132
                $contents
133
            );
134
            
135
        }
136
    }
137
138
    protected static function updateComposer($root, $camel_case)
139
    {
@@ 138-150 (lines=13) @@
135
        }
136
    }
137
138
    protected static function updateComposer($root, $camel_case)
139
    {
140
        $file = $root.'/composer.json';
141
        if(file_exists($file)) {
142
            $contents = file_get_contents($file);
143
            $contents = str_replace('WPB', strtoupper($camel_case), $contents);
144
            file_put_contents(
145
                $file,
146
                $contents
147
            );
148
            
149
        }
150
    }
151
}
152