Conditions | 5 |
Paths | 5 |
Total Lines | 20 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 30 |
Changes | 0 |
1 | <?php |
||
41 | public function getBackupFiles(): array |
||
42 | { |
||
43 | $items = $this->client->listFolder($this->path, ['limit' => 100]); |
||
44 | foreach ($items->getItems() as $item) { |
||
45 | // skip directories |
||
46 | if ($item instanceof \Kunnu\Dropbox\Models\FolderMetadata) { |
||
47 | continue; |
||
48 | } |
||
49 | /** @var \Kunnu\Dropbox\Models\FileMetadata $item */ |
||
50 | // skip currently created backup |
||
51 | if ($item->getPathDisplay() == $this->path . $this->target->getFilename()) { |
||
52 | continue; |
||
53 | } |
||
54 | if ($this->isFilenameMatch($item->getName())) { |
||
55 | $this->files[] = new \phpbu\App\Backup\File\Dropbox($this->client, $item); |
||
56 | } |
||
57 | } |
||
58 | |||
59 | return $this->files; |
||
60 | } |
||
61 | } |