mirror of
https://github.com/Chouchen/Shikiryu_Backup.git
synced 2021-06-30 16:02:14 +02:00
💚 Update rules for PHPMD
This commit is contained in:
@@ -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