Code Duplication    Length = 7-7 lines in 2 locations

class/DoSync.php 1 location

@@ 147-153 (lines=7) @@
144
            return false;
145
        }
146
        while ($file = readdir($dir_handle)) {
147
            if ('.' != $file && '..' != $file) {
148
                if (!is_dir($dirname . '/' . $file)) {
149
                    unlink($dirname . '/' . $file);
150
                } else {
151
                    $this->SmallworldDeleteDirectory($dirname . '/' . $file);
152
                }
153
            }
154
        }
155
        closedir($dir_handle);
156
        rmdir($dirname);

class/SwDatabase.php 1 location

@@ 668-674 (lines=7) @@
665
            return false;
666
        }
667
        while (false !== ($file = readdir($dir_handle))) {
668
            if ('.' !== $file && '..' !== $file) {
669
                if (!is_dir($dirname . '/' . $file)) {
670
                    unlink($dirname . '/' . $file);
671
                } else {
672
                    $this->SmallworldDeleteDirectory($dirname . '/' . $file);
673
                }
674
            }
675
        }
676
        closedir($dir_handle);
677
        rmdir($dirname);