Conditions | 5 |
Paths | 5 |
Total Lines | 17 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 30 |
Changes | 0 |
1 | <?php |
||
37 | public function getBackupFiles(): array |
||
38 | { |
||
39 | $files = $this->flySystem->listContents(); |
||
40 | foreach ($files as $file) { |
||
41 | if ($file['type'] != 'file') { |
||
42 | continue; |
||
43 | } |
||
44 | // skip currently created backup |
||
45 | if ($file['basename'] == $this->target->getFilename()) { |
||
46 | continue; |
||
47 | } |
||
48 | if ($this->isFilenameMatch($file['basename'])) { |
||
49 | $this->files[] = new \phpbu\App\Backup\File\Ftp($this->flySystem, $file); |
||
50 | } |
||
51 | } |
||
52 | return $this->files; |
||
53 | } |
||
54 | } |
||
55 |