diff options
Diffstat (limited to 'app/Exceptions')
| -rw-r--r-- | app/Exceptions/AlreadySubscribedException.php | 6 | ||||
| -rw-r--r-- | app/Exceptions/BadUrlException.php | 2 | ||||
| -rw-r--r-- | app/Exceptions/FeedNotAddedException.php | 6 | ||||
| -rw-r--r-- | app/Exceptions/ZipException.php | 6 |
4 files changed, 13 insertions, 7 deletions
diff --git a/app/Exceptions/AlreadySubscribedException.php b/app/Exceptions/AlreadySubscribedException.php index 33b9f9555..c2b11d3a0 100644 --- a/app/Exceptions/AlreadySubscribedException.php +++ b/app/Exceptions/AlreadySubscribedException.php @@ -1,14 +1,16 @@ <?php class FreshRSS_AlreadySubscribed_Exception extends Exception { + + /** @var string */ private $feedName = ''; - public function __construct($url, $feedName) { + public function __construct(string $url, string $feedName) { parent::__construct('Already subscribed! ' . $url, 2135); $this->feedName = $feedName; } - public function feedName() { + public function feedName(): string { return $this->feedName; } } diff --git a/app/Exceptions/BadUrlException.php b/app/Exceptions/BadUrlException.php index d2509e4ba..748a619d6 100644 --- a/app/Exceptions/BadUrlException.php +++ b/app/Exceptions/BadUrlException.php @@ -2,7 +2,7 @@ class FreshRSS_BadUrl_Exception extends FreshRSS_Feed_Exception { - public function __construct($url) { + public function __construct(string $url) { parent::__construct('`' . $url . '` is not a valid URL'); } diff --git a/app/Exceptions/FeedNotAddedException.php b/app/Exceptions/FeedNotAddedException.php index 59fa74b16..b10e93f05 100644 --- a/app/Exceptions/FeedNotAddedException.php +++ b/app/Exceptions/FeedNotAddedException.php @@ -1,14 +1,16 @@ <?php class FreshRSS_FeedNotAdded_Exception extends Exception { + + /** @var string */ private $url = ''; - public function __construct($url) { + public function __construct(string $url) { parent::__construct('Feed not added! ' . $url, 2147); $this->url = $url; } - public function url() { + public function url(): string { return $this->url; } } diff --git a/app/Exceptions/ZipException.php b/app/Exceptions/ZipException.php index 9ed40c4cb..ecf546533 100644 --- a/app/Exceptions/ZipException.php +++ b/app/Exceptions/ZipException.php @@ -1,14 +1,16 @@ <?php class FreshRSS_Zip_Exception extends Exception { + + /** @var int */ private $zipErrorCode = 0; - public function __construct($zipErrorCode) { + public function __construct(int $zipErrorCode) { parent::__construct('ZIP error!', 2141); $this->zipErrorCode = $zipErrorCode; } - public function zipErrorCode() { + public function zipErrorCode(): int { return $this->zipErrorCode; } } |
