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