From 43a5907a139e2ce1d6152979a231e0bede11ee5c Mon Sep 17 00:00:00 2001 From: huangjx Date: Sun, 24 Apr 2022 11:38:08 +0800 Subject: [PATCH] fixed novice mistakes --- lib/Tools/Aria2.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/Tools/Aria2.php b/lib/Tools/Aria2.php index c7b08ae..af730d7 100644 --- a/lib/Tools/Aria2.php +++ b/lib/Tools/Aria2.php @@ -101,10 +101,10 @@ class Aria2 mkdir($this->confDir, 0755, true); } $dir = ""; - if ($dir = $this->getDownloadDir() && !is_dir($dir)) { + if (($dir = $this->getDownloadDir()) && !is_dir($dir)) { mkdir($dir, 0755, true); } - if ($dir = $this->getTorrentsDir() && !is_dir($dir)) { + if (($dir = $this->getTorrentsDir()) && !is_dir($dir)) { mkdir($dir, 0755, true); } $this->followTorrent(true); @@ -129,7 +129,7 @@ class Aria2 $this->torrentsDir = $dir; return $this; } - public function getTorrentsDir() + public function getTorrentsDir(): string { return $this->torrentsDir; } @@ -139,7 +139,7 @@ class Aria2 $this->downloadDir = $dir; return $this; } - public function getDownloadDir() + public function getDownloadDir(): string { return $this->downloadDir; }