Fix return type and parameter name inconsistencies in Notification classes

This commit is contained in:
Younes ENNAJI
2026-03-02 03:46:43 +00:00
parent d39159cf90
commit 9454b2d155
3 changed files with 4 additions and 2 deletions
+2
View File
@@ -23,6 +23,8 @@
* fix [Flasher] Add reset() method to ContentSecurityPolicyHandler to fix CSP state leak in long-running processes (Octane, FrankenPHP)
* fix [Flasher] Fix FilterEvent::setFilter() type inconsistency - now accepts FilterInterface instead of concrete Filter class
* fix [Flasher] Remove redundant callable check in FlasherContainer::getContainer()
* fix [Flasher] Fix NotificationStorageMethods::resolveResourceName() return type from ?string to string (never returns null)
* fix [Flasher] Fix parameter name inconsistency in NotificationBuilderInterface::options() - changed $merge to $append to match implementation
## [v2.1.3](https://github.com/php-flasher/php-flasher/compare/v2.1.2...v2.1.3) - 2025-01-25
@@ -17,7 +17,7 @@ interface NotificationBuilderInterface
/**
* @param array<string, mixed> $options
*/
public function options(array $options, bool $merge = true): static;
public function options(array $options, bool $append = true): static;
public function option(string $name, mixed $value): static;
@@ -117,7 +117,7 @@ trait NotificationStorageMethods
return $envelope;
}
private function resolveResourceName(object $object): ?string
private function resolveResourceName(object $object): string
{
$displayName = \is_callable([$object, 'getFlashIdentifier']) ? $object->getFlashIdentifier() : null;