mirror of
https://github.com/Chouchen/Shikiryu_Backup.git
synced 2026-09-24 16:03:54 +02:00
🎨 Reformat some code
This commit is contained in:
1 parent
db51375185
commit
43e7dd2808
10 files changed
+63
-52
No files matched your search
@@ -54,7 +54,7 @@ class Scenario
|
||||
if ($this->backup->isValid()) {
|
||||
$this->transport->send();
|
||||
} else {
|
||||
throw new \Exception("Backup configuration is invalid.");
|
||||
throw new \Exception('Backup configuration is invalid.');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -75,7 +75,7 @@ class Scenario
|
||||
// check the given scenario
|
||||
if (is_readable($scenario)) {
|
||||
$scenario = json_decode(file_get_contents($scenario), true);
|
||||
if (!is_null($scenario) && static::isValid($scenario)) {
|
||||
if ($scenario !== null && static::isValid($scenario)) {
|
||||
try {
|
||||
$scenario = new self($scenario);
|
||||
$scenario->send();
|
||||
@@ -99,9 +99,8 @@ class Scenario
|
||||
public static function isValid(array $scenario)
|
||||
{
|
||||
return
|
||||
isset($scenario['backup']) &&
|
||||
isset($scenario['backup'], $scenario['transport']) &&
|
||||
count($scenario['backup']) === 1 &&
|
||||
isset($scenario['transport']) &&
|
||||
count($scenario['transport']) === 1;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user