mirror of
https://github.com/Chouchen/Shikiryu_Backup.git
synced 2026-09-24 16:03:54 +02:00
💚 Update rules for PHPMD
This commit is contained in:
1 parent
aa9127262f
commit
ba5910f3bd
9 files changed
+59
-32
No files matched your search
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace Shikiryu\Backup\Transport;
|
||||
|
||||
use Exception;
|
||||
use Shikiryu\Backup\Backup\BackupAbstract;
|
||||
|
||||
class Folder extends TransportAbstract
|
||||
@@ -25,7 +26,7 @@ class Folder extends TransportAbstract
|
||||
/**
|
||||
* @return bool
|
||||
*
|
||||
* @throws \Exception
|
||||
* @throws Exception
|
||||
*/
|
||||
public function send()
|
||||
{
|
||||
@@ -35,7 +36,7 @@ class Folder extends TransportAbstract
|
||||
if ($this->backup->isLocal()) {
|
||||
foreach ($this->backup->getFilesToBackup() as $file => $name) {
|
||||
if (copy($file, $this->folder . $name) === false) {
|
||||
throw new \Exception(sprintf('Copy of %s in %s failed', $name, $this->folder));
|
||||
throw new Exception(sprintf('Copy of %s in %s failed', $name, $this->folder));
|
||||
}
|
||||
}
|
||||
foreach ($this->backup->getStreamsToBackup() as $name => $file) {
|
||||
@@ -43,7 +44,7 @@ class Folder extends TransportAbstract
|
||||
$name = 'backup' . $name . '.txt';
|
||||
}
|
||||
if (file_put_contents($this->folder . $name, $file) === false) {
|
||||
throw new \Exception(sprintf('Saving of %s in %s failed', $name, $this->folder));
|
||||
throw new Exception(sprintf('Saving of %s in %s failed', $name, $this->folder));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user