mirror of
https://github.com/FreshRSS/FreshRSS.git
synced 2025-12-30 17:07:49 -05:00
Take advantage of https://phpstan.org/blog/bring-your-exceptions-under-control Minimum changes to pass `tooWideThrowType` and `implicitThrows`. Revert some mistakes from: https://github.com/FreshRSS/FreshRSS/pull/5504 Preparation needed before new PRs of the same type: https://github.com/FreshRSS/FreshRSS/pull/5962 Fix several wrong PHPDocs and catches: > Method ... has ...Exception in PHPDoc @throws tag but it's not thrown. > Dead catch - ...Exception is never thrown in the try block.
17 lines
308 B
PHP
17 lines
308 B
PHP
<?php
|
|
declare(strict_types=1);
|
|
|
|
class FreshRSS_FeedNotAdded_Exception extends Minz_Exception {
|
|
|
|
private string $url = '';
|
|
|
|
public function __construct(string $url) {
|
|
parent::__construct('Feed not added! ' . $url, 2147);
|
|
$this->url = $url;
|
|
}
|
|
|
|
public function url(): string {
|
|
return $this->url;
|
|
}
|
|
}
|