Code Duplication    Length = 6-6 lines in 2 locations

build.php 2 locations

@@ 149-154 (lines=6) @@
146
 * @return void
147
 */
148
function write_module($module) {
149
    if ($module->docs) {
150
        $docsDir  = dirname($module->docsPath);
151
        if (!is_dir($docsDir))
152
            mkdir($docsDir, 0777, true);
153
        file_put_contents($module->docsPath,  $module->docs);
154
    }
155
    if ($module->tests) {
156
        $testsDir = dirname($module->testsPath);
157
        if (!is_dir($testsDir))
@@ 155-160 (lines=6) @@
152
            mkdir($docsDir, 0777, true);
153
        file_put_contents($module->docsPath,  $module->docs);
154
    }
155
    if ($module->tests) {
156
        $testsDir = dirname($module->testsPath);
157
        if (!is_dir($testsDir))
158
            mkdir($testsDir, 0777, true);
159
        file_put_contents($module->testsPath, $module->tests);
160
    }
161
    if ($module->streamOperations) {
162
        file_put_contents('src/Internal/_stream_operations.php', $module->streamOperations, FILE_APPEND);
163
    }