chore: update the doc and improve phpstan annotations

This commit is contained in:
Younes ENNAJI
2024-05-05 17:52:48 +01:00
parent eafa471fde
commit d2f019fb62
135 changed files with 3329 additions and 1423 deletions
+14 -1
View File
@@ -19,7 +19,7 @@ final class NotyBuilder extends NotificationBuilder
/**
* @param array<string, mixed> $options
*/
public function alert(?string $message = null, array $options = []): self
public function alert(?string $message = null, ?string $title = null, array $options = []): self
{
$this->type('alert');
@@ -27,6 +27,10 @@ final class NotyBuilder extends NotificationBuilder
$this->message($message);
}
if ($title) {
$this->title($title);
}
if ([] !== $options) {
$this->options($options);
}
@@ -91,6 +95,9 @@ final class NotyBuilder extends NotificationBuilder
}
/**
* @param "open"|"close" $animation
* @param "noty_effects_open"|"noty_effects_close"|string $effect
*
* If string, assumed to be CSS class name. If null, no animation at all. If function, runs the function. (v3.0.1+)
* You can use animate.css class names or your custom css animations as well.
*/
@@ -101,6 +108,9 @@ final class NotyBuilder extends NotificationBuilder
return $this;
}
/**
* @param "sources"|"volume"|"conditions" $option
*/
public function sounds(string $option, mixed $value): self
{
$this->option('sounds.'.$option, $value);
@@ -108,6 +118,9 @@ final class NotyBuilder extends NotificationBuilder
return $this;
}
/**
* @param "conditions"|string $option
*/
public function docTitle(string $option, string $docTitle): self
{
$this->option('docTitle'.$option, $docTitle);