Code Duplication    Length = 8-8 lines in 2 locations

api/src/Etemplate/Widget/Vfs.php 2 locations

@@ 88-95 (lines=8) @@
85
						'maxdepth' => 1,
86
						'name' => $relpath . '*'
87
					));
88
					foreach($find as $file)
89
					{
90
						$file_info = Api\Vfs::stat($file);
91
						$file_info['path'] = $file;
92
						$file_info['name'] = Api\Vfs::basename($file_info['path']);
93
						$file_info['mime'] = Api\Vfs::mime_content_type($file_info['path']);
94
						$value[] = $file_info;
95
					}
96
				}
97
				else if (substr($path, -1) == '/' && Api\Vfs::is_dir($path))
98
				{
@@ 100-107 (lines=8) @@
97
				else if (substr($path, -1) == '/' && Api\Vfs::is_dir($path))
98
				{
99
					$scan = Api\Vfs::scandir($path);
100
					foreach($scan as $file)
101
					{
102
						$file_info = Api\Vfs::stat("$path$file");
103
						$file_info['path'] = "$path$file";
104
						$file_info['name'] = Api\Vfs::basename($file_info['path']);
105
						$file_info['mime'] = Api\Vfs::mime_content_type($file_info['path']);
106
						$value[] = $file_info;
107
					}
108
				}
109
			}
110
		}