Conditions | 5 |
Paths | 5 |
Total Lines | 21 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 30 |
Changes | 0 |
1 | <?php |
||
43 | public function getBackupFiles(): array |
||
44 | { |
||
45 | // get all objects matching our path prefix |
||
46 | $objects = $this->container->listObjects(['prefix' => $this->path]); |
||
47 | /** @var StorageObject $object */ |
||
48 | foreach ($objects as $object) { |
||
49 | // skip directories |
||
50 | if ($object->contentType == 'application/directory') { |
||
51 | continue; |
||
52 | } |
||
53 | // skip currently created backup |
||
54 | if ($object->name == $this->path . $this->target->getFilename()) { |
||
55 | continue; |
||
56 | } |
||
57 | if ($this->isFilenameMatch(basename($object->name))) { |
||
58 | $this->files[] = new \phpbu\App\Backup\File\OpenStack($this->container, $object); |
||
59 | } |
||
60 | } |
||
61 | |||
62 | return $this->files; |
||
63 | } |
||
64 | } |
||
65 |