Code Duplication    Length = 7-7 lines in 2 locations

class/DoSync.php 1 location

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

class/SwDatabase.php 1 location

@@ 563-569 (lines=7) @@
560
            return false;
561
        }
562
        while (false !== ($file = readdir($dir_handle))) {
563
            if ('.' !== $file && '..' !== $file) {
564
                if (!is_dir($dirname . '/' . $file)) {
565
                    unlink($dirname . '/' . $file);
566
                } else {
567
                    $this->SmallworldDeleteDirectory($dirname . '/' . $file);
568
                }
569
            }
570
        }
571
        closedir($dir_handle);
572
        rmdir($dirname);