mirror of
				https://github.com/firefly-iii/firefly-iii.git
				synced 2025-10-31 10:47:00 +00:00 
			
		
		
		
	Fix a bunch of phpstan issues.
This commit is contained in:
		| @@ -53,6 +53,7 @@ class TestNotification extends Notification | ||||
|      * Get the array representation of the notification. | ||||
|      * | ||||
|      * @param mixed $notifiable | ||||
|      * @SuppressWarnings(PHPMD.UnusedFormalParameter) | ||||
|      * | ||||
|      * @return array | ||||
|      */ | ||||
| @@ -67,6 +68,7 @@ class TestNotification extends Notification | ||||
|      * Get the mail representation of the notification. | ||||
|      * | ||||
|      * @param mixed $notifiable | ||||
|      * @SuppressWarnings(PHPMD.UnusedFormalParameter) | ||||
|      * | ||||
|      * @return MailMessage | ||||
|      */ | ||||
| @@ -81,6 +83,7 @@ class TestNotification extends Notification | ||||
|      * Get the Slack representation of the notification. | ||||
|      * | ||||
|      * @param mixed $notifiable | ||||
|      * @SuppressWarnings(PHPMD.UnusedFormalParameter) | ||||
|      * | ||||
|      * @return SlackMessage | ||||
|      */ | ||||
| @@ -91,6 +94,7 @@ class TestNotification extends Notification | ||||
| 
 | ||||
|     /** | ||||
|      * Get the notification's delivery channels. | ||||
|      * @SuppressWarnings(PHPMD.UnusedFormalParameter) | ||||
|      * | ||||
|      * @param mixed $notifiable | ||||
|      * | ||||
|   | ||||
| @@ -56,6 +56,7 @@ class UserInvitation extends Notification | ||||
|      * @param mixed $notifiable | ||||
|      * | ||||
|      * @return array | ||||
|      * @SuppressWarnings(PHPMD.UnusedFormalParameter) | ||||
|      */ | ||||
|     public function toArray($notifiable) | ||||
|     { | ||||
| @@ -70,6 +71,7 @@ class UserInvitation extends Notification | ||||
|      * @param mixed $notifiable | ||||
|      * | ||||
|      * @return MailMessage | ||||
|      * @SuppressWarnings(PHPMD.UnusedFormalParameter) | ||||
|      */ | ||||
|     public function toMail($notifiable) | ||||
|     { | ||||
| @@ -84,6 +86,7 @@ class UserInvitation extends Notification | ||||
|      * @param mixed $notifiable | ||||
|      * | ||||
|      * @return SlackMessage | ||||
|      * @SuppressWarnings(PHPMD.UnusedFormalParameter) | ||||
|      */ | ||||
|     public function toSlack($notifiable) | ||||
|     { | ||||
| @@ -98,6 +101,7 @@ class UserInvitation extends Notification | ||||
|      * @param mixed $notifiable | ||||
|      * | ||||
|      * @return array | ||||
|      * @SuppressWarnings(PHPMD.UnusedFormalParameter) | ||||
|      */ | ||||
|     public function via($notifiable) | ||||
|     { | ||||
|   | ||||
| @@ -56,6 +56,7 @@ class UserRegistration extends Notification | ||||
|      * @param mixed $notifiable | ||||
|      * | ||||
|      * @return array | ||||
|      * @SuppressWarnings(PHPMD.UnusedFormalParameter) | ||||
|      */ | ||||
|     public function toArray($notifiable) | ||||
|     { | ||||
| @@ -70,6 +71,7 @@ class UserRegistration extends Notification | ||||
|      * @param mixed $notifiable | ||||
|      * | ||||
|      * @return MailMessage | ||||
|      * @SuppressWarnings(PHPMD.UnusedFormalParameter) | ||||
|      */ | ||||
|     public function toMail($notifiable) | ||||
|     { | ||||
| @@ -84,6 +86,7 @@ class UserRegistration extends Notification | ||||
|      * @param mixed $notifiable | ||||
|      * | ||||
|      * @return SlackMessage | ||||
|      * @SuppressWarnings(PHPMD.UnusedFormalParameter) | ||||
|      */ | ||||
|     public function toSlack($notifiable) | ||||
|     { | ||||
| @@ -96,6 +99,7 @@ class UserRegistration extends Notification | ||||
|      * @param mixed $notifiable | ||||
|      * | ||||
|      * @return array | ||||
|      * @SuppressWarnings(PHPMD.UnusedFormalParameter) | ||||
|      */ | ||||
|     public function via($notifiable) | ||||
|     { | ||||
|   | ||||
| @@ -56,6 +56,7 @@ class VersionCheckResult extends Notification | ||||
|      * @param mixed $notifiable | ||||
|      * | ||||
|      * @return array | ||||
|      * @SuppressWarnings(PHPMD.UnusedFormalParameter) | ||||
|      */ | ||||
|     public function toArray($notifiable) | ||||
|     { | ||||
| @@ -70,6 +71,7 @@ class VersionCheckResult extends Notification | ||||
|      * @param mixed $notifiable | ||||
|      * | ||||
|      * @return MailMessage | ||||
|      * @SuppressWarnings(PHPMD.UnusedFormalParameter) | ||||
|      */ | ||||
|     public function toMail($notifiable) | ||||
|     { | ||||
| @@ -84,6 +86,7 @@ class VersionCheckResult extends Notification | ||||
|      * @param mixed $notifiable | ||||
|      * | ||||
|      * @return SlackMessage | ||||
|      * @SuppressWarnings(PHPMD.UnusedFormalParameter) | ||||
|      */ | ||||
|     public function toSlack($notifiable) | ||||
|     { | ||||
| @@ -99,6 +102,7 @@ class VersionCheckResult extends Notification | ||||
|      * @param mixed $notifiable | ||||
|      * | ||||
|      * @return array | ||||
|      * @SuppressWarnings(PHPMD.UnusedFormalParameter) | ||||
|      */ | ||||
|     public function via($notifiable) | ||||
|     { | ||||
|   | ||||
| @@ -61,6 +61,7 @@ class BillReminder extends Notification | ||||
|      * @param mixed $notifiable | ||||
|      * | ||||
|      * @return array | ||||
|      * @SuppressWarnings(PHPMD.UnusedFormalParameter) | ||||
|      */ | ||||
|     public function toArray($notifiable) | ||||
|     { | ||||
| @@ -75,6 +76,7 @@ class BillReminder extends Notification | ||||
|      * @param mixed $notifiable | ||||
|      * | ||||
|      * @return MailMessage | ||||
|      * @SuppressWarnings(PHPMD.UnusedFormalParameter) | ||||
|      */ | ||||
|     public function toMail($notifiable) | ||||
|     { | ||||
| @@ -94,6 +96,7 @@ class BillReminder extends Notification | ||||
|      * @param mixed $notifiable | ||||
|      * | ||||
|      * @return SlackMessage | ||||
|      * @SuppressWarnings(PHPMD.UnusedFormalParameter) | ||||
|      */ | ||||
|     public function toSlack($notifiable) | ||||
|     { | ||||
| @@ -117,6 +120,7 @@ class BillReminder extends Notification | ||||
|      * @param mixed $notifiable | ||||
|      * | ||||
|      * @return array | ||||
|      * @SuppressWarnings(PHPMD.UnusedFormalParameter) | ||||
|      */ | ||||
|     public function via($notifiable) | ||||
|     { | ||||
| @@ -126,7 +130,7 @@ class BillReminder extends Notification | ||||
|         if (is_array($slackUrl)) { | ||||
|             $slackUrl = ''; | ||||
|         } | ||||
|         if (UrlValidator::isValidWebhookURL((string) $slackUrl)) { | ||||
|         if (UrlValidator::isValidWebhookURL((string)$slackUrl)) { | ||||
|             return ['mail', 'slack']; | ||||
|         } | ||||
|         return ['mail']; | ||||
|   | ||||
| @@ -53,6 +53,7 @@ class NewAccessToken extends Notification | ||||
|      * @param mixed $notifiable | ||||
|      * | ||||
|      * @return array | ||||
|      * @SuppressWarnings(PHPMD.UnusedFormalParameter) | ||||
|      */ | ||||
|     public function toArray($notifiable) | ||||
|     { | ||||
| @@ -67,6 +68,7 @@ class NewAccessToken extends Notification | ||||
|      * @param mixed $notifiable | ||||
|      * | ||||
|      * @return MailMessage | ||||
|      * @SuppressWarnings(PHPMD.UnusedFormalParameter) | ||||
|      */ | ||||
|     public function toMail($notifiable) | ||||
|     { | ||||
| @@ -81,6 +83,7 @@ class NewAccessToken extends Notification | ||||
|      * @param mixed $notifiable | ||||
|      * | ||||
|      * @return SlackMessage | ||||
|      * @SuppressWarnings(PHPMD.UnusedFormalParameter) | ||||
|      */ | ||||
|     public function toSlack($notifiable) | ||||
|     { | ||||
| @@ -93,6 +96,7 @@ class NewAccessToken extends Notification | ||||
|      * @param mixed $notifiable | ||||
|      * | ||||
|      * @return array | ||||
|      * @SuppressWarnings(PHPMD.UnusedFormalParameter) | ||||
|      */ | ||||
|     public function via($notifiable) | ||||
|     { | ||||
|   | ||||
| @@ -66,6 +66,7 @@ class RuleActionFailed extends Notification | ||||
|      * @param mixed $notifiable | ||||
|      * | ||||
|      * @return array | ||||
|      * @SuppressWarnings(PHPMD.UnusedFormalParameter) | ||||
|      */ | ||||
|     public function toArray($notifiable) | ||||
|     { | ||||
| @@ -80,6 +81,7 @@ class RuleActionFailed extends Notification | ||||
|      * @param mixed $notifiable | ||||
|      * | ||||
|      * @return SlackMessage | ||||
|      * @SuppressWarnings(PHPMD.UnusedFormalParameter) | ||||
|      */ | ||||
|     public function toSlack($notifiable) | ||||
|     { | ||||
| @@ -101,6 +103,7 @@ class RuleActionFailed extends Notification | ||||
|      * @param mixed $notifiable | ||||
|      * | ||||
|      * @return array | ||||
|      * @SuppressWarnings(PHPMD.UnusedFormalParameter) | ||||
|      */ | ||||
|     public function via($notifiable) | ||||
|     { | ||||
|   | ||||
| @@ -53,6 +53,7 @@ class TransactionCreation extends Notification | ||||
|      * @param mixed $notifiable | ||||
|      * | ||||
|      * @return array | ||||
|      * @SuppressWarnings(PHPMD.UnusedFormalParameter) | ||||
|      */ | ||||
|     public function toArray($notifiable) | ||||
|     { | ||||
| @@ -67,6 +68,7 @@ class TransactionCreation extends Notification | ||||
|      * @param mixed $notifiable | ||||
|      * | ||||
|      * @return MailMessage | ||||
|      * @SuppressWarnings(PHPMD.UnusedFormalParameter) | ||||
|      */ | ||||
|     public function toMail($notifiable) | ||||
|     { | ||||
| @@ -81,6 +83,7 @@ class TransactionCreation extends Notification | ||||
|      * @param mixed $notifiable | ||||
|      * | ||||
|      * @return array | ||||
|      * @SuppressWarnings(PHPMD.UnusedFormalParameter) | ||||
|      */ | ||||
|     public function via($notifiable) | ||||
|     { | ||||
|   | ||||
| @@ -57,6 +57,7 @@ class UserLogin extends Notification | ||||
|      * @param mixed $notifiable | ||||
|      * | ||||
|      * @return array | ||||
|      * @SuppressWarnings(PHPMD.UnusedFormalParameter) | ||||
|      */ | ||||
|     public function toArray($notifiable) | ||||
|     { | ||||
| @@ -71,6 +72,7 @@ class UserLogin extends Notification | ||||
|      * @param mixed $notifiable | ||||
|      * | ||||
|      * @return MailMessage | ||||
|      * @SuppressWarnings(PHPMD.UnusedFormalParameter) | ||||
|      */ | ||||
|     public function toMail($notifiable) | ||||
|     { | ||||
| @@ -97,6 +99,7 @@ class UserLogin extends Notification | ||||
|      * @param mixed $notifiable | ||||
|      * | ||||
|      * @return SlackMessage | ||||
|      * @SuppressWarnings(PHPMD.UnusedFormalParameter) | ||||
|      */ | ||||
|     public function toSlack($notifiable) | ||||
|     { | ||||
| @@ -120,6 +123,7 @@ class UserLogin extends Notification | ||||
|      * @param mixed $notifiable | ||||
|      * | ||||
|      * @return array | ||||
|      * @SuppressWarnings(PHPMD.UnusedFormalParameter) | ||||
|      */ | ||||
|     public function via($notifiable) | ||||
|     { | ||||
| @@ -129,7 +133,7 @@ class UserLogin extends Notification | ||||
|         if (is_array($slackUrl)) { | ||||
|             $slackUrl = ''; | ||||
|         } | ||||
|         if (UrlValidator::isValidWebhookURL((string) $slackUrl)) { | ||||
|         if (UrlValidator::isValidWebhookURL((string)$slackUrl)) { | ||||
|             return ['mail', 'slack']; | ||||
|         } | ||||
|         return ['mail']; | ||||
|   | ||||
| @@ -53,6 +53,7 @@ class UserNewPassword extends Notification | ||||
|      * @param mixed $notifiable | ||||
|      * | ||||
|      * @return array | ||||
|      * @SuppressWarnings(PHPMD.UnusedFormalParameter) | ||||
|      */ | ||||
|     public function toArray($notifiable) | ||||
|     { | ||||
| @@ -67,6 +68,7 @@ class UserNewPassword extends Notification | ||||
|      * @param mixed $notifiable | ||||
|      * | ||||
|      * @return MailMessage | ||||
|      * @SuppressWarnings(PHPMD.UnusedFormalParameter) | ||||
|      */ | ||||
|     public function toMail($notifiable) | ||||
|     { | ||||
| @@ -81,6 +83,7 @@ class UserNewPassword extends Notification | ||||
|      * @param mixed $notifiable | ||||
|      * | ||||
|      * @return array | ||||
|      * @SuppressWarnings(PHPMD.UnusedFormalParameter) | ||||
|      */ | ||||
|     public function via($notifiable) | ||||
|     { | ||||
|   | ||||
| @@ -50,6 +50,7 @@ class UserRegistration extends Notification | ||||
|      * @param mixed $notifiable | ||||
|      * | ||||
|      * @return array | ||||
|      * @SuppressWarnings(PHPMD.UnusedFormalParameter) | ||||
|      */ | ||||
|     public function toArray($notifiable) | ||||
|     { | ||||
| @@ -64,6 +65,7 @@ class UserRegistration extends Notification | ||||
|      * @param mixed $notifiable | ||||
|      * | ||||
|      * @return MailMessage | ||||
|      * @SuppressWarnings(PHPMD.UnusedFormalParameter) | ||||
|      */ | ||||
|     public function toMail($notifiable) | ||||
|     { | ||||
| @@ -78,6 +80,7 @@ class UserRegistration extends Notification | ||||
|      * @param mixed $notifiable | ||||
|      * | ||||
|      * @return array | ||||
|      * @SuppressWarnings(PHPMD.UnusedFormalParameter) | ||||
|      */ | ||||
|     public function via($notifiable) | ||||
|     { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user