Code Duplication    Length = 12-13 lines in 2 locations

src/ComposerScripts.php 2 locations

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