Conditions | 5 |
Paths | 5 |
Total Lines | 20 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Tests | 10 |
CRAP Score | 5 |
Changes | 0 |
1 | <?php |
||
53 | 1 | public function getBackupFiles() : array |
|
54 | { |
||
55 | 1 | $items = $this->client->listFolder($this->path, ['limit' => 100]); |
|
56 | 1 | foreach ($items->getItems() as $item) { |
|
57 | // skip directories |
||
58 | 1 | if ($item instanceof \Kunnu\Dropbox\Models\FolderMetadata) { |
|
59 | 1 | continue; |
|
60 | } |
||
61 | /** @var \Kunnu\Dropbox\Models\FileMetadata $item */ |
||
62 | // skip currently created backup |
||
63 | 1 | if ($item->getPathDisplay() == $this->path . $this->target->getFilename()) { |
|
64 | 1 | continue; |
|
65 | } |
||
66 | 1 | if ($this->isFilenameMatch($item->getName())) { |
|
67 | 1 | $this->files[] = new \phpbu\App\Backup\File\Dropbox($this->client, $item); |
|
68 | } |
||
69 | } |
||
70 | |||
71 | 1 | return $this->files; |
|
72 | } |
||
73 | } |
||
74 |