Code Duplication    Length = 3-3 lines in 2 locations

service/notesservice.php 2 locations

@@ 216-218 (lines=3) @@
213
        $files = $folder->getDirectoryListing();
214
        if(is_array($files)) {
215
            echo count($files).' result(s) from Folder->getDirectoryListing():'.PHP_EOL;
216
            foreach($files as $f) {
217
                echo $f->getPath().' (ID '.$f->getId().')'.PHP_EOL;
218
            }
219
        }
220
        echo count($file).' result(s) from Folder->getById('.$id.'):'.PHP_EOL;
221
        foreach($file as $f) {
@@ 221-223 (lines=3) @@
218
            }
219
        }
220
        echo count($file).' result(s) from Folder->getById('.$id.'):'.PHP_EOL;
221
        foreach($file as $f) {
222
             echo $f->getPath().' (ID '.$f->getId().')'.PHP_EOL;
223
        }
224
225
        if(count($file) <= 0 || !$this->isNote($file[0])) {
226
            echo '=> NoteDoesNotExistException'.PHP_EOL;