mirror of
https://github.com/Chouchen/Shikiryu_Backup.git
synced 2026-09-24 16:03:54 +02:00
Add some PHPCS corrections
This commit is contained in:
1 parent
dd2a6bd7d7
commit
ab7887ce84
13 files changed
+238
-200
No files matched your search
@@ -7,7 +7,11 @@ use Shikiryu\Backup\Transport\TransportAbstract;
|
||||
|
||||
class Dropbox extends TransportAbstract
|
||||
{
|
||||
|
||||
/**
|
||||
* Dropbox Client
|
||||
*
|
||||
* @var Client
|
||||
*/
|
||||
private $dropbox;
|
||||
|
||||
protected $token = '';
|
||||
@@ -26,23 +30,23 @@ class Dropbox extends TransportAbstract
|
||||
public function send()
|
||||
{
|
||||
$sent = true;
|
||||
$files = $this->backup->getFilesToBackup();
|
||||
$files = $this->backup->getFilesTobackup();
|
||||
foreach ($files as $file => $name) {
|
||||
$file = fopen($file, 'r');
|
||||
$upload = $this->dropbox->uploadFile($this->folder.'/'.$name, \Dropbox\WriteMode::force(), $file);
|
||||
if (!$upload) {
|
||||
$sent = false;
|
||||
echo 'DROPBOX upload manquée de '.$file.' vers '.$this->folder.$name;
|
||||
echo 'DROPBOX upload manqu�e de '.$file.' vers '.$this->folder.$name;
|
||||
}
|
||||
}
|
||||
$streams = $this->backup->getStreamsToBackup();
|
||||
$streams = $this->backup->getStreamsTobackup();
|
||||
foreach ($streams as $stream => $name) {
|
||||
$upload = $this->dropbox->uploadFileFromString($this->folder.'/'.$name, \Dropbox\WriteMode::force(), $stream);
|
||||
if (!$upload) {
|
||||
$sent = false;
|
||||
echo 'DROPBOX upload manquée de '.$file.' vers '.$this->folder.$name;
|
||||
echo 'DROPBOX upload manqu�e de '.$file.' vers '.$this->folder.$name;
|
||||
}
|
||||
}
|
||||
return $sent;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user