Improves documentation with parameter types

This commit is contained in:
Younes ENNAJI
2026-01-15 22:56:11 +01:00
parent ea164fde17
commit fcf5c63f58
4 changed files with 7 additions and 1 deletions
+2 -1
View File
@@ -180,7 +180,8 @@ final class NotyBuilder extends NotificationBuilder
}
/**
* @param "open"|"close" $option
* @param 'open'|'close' $option
* @param 'noty_effects_open'|'noty_effects_close'|string $effect
*/
public function animation(string $option, string $effect): self
{
+3
View File
@@ -36,6 +36,9 @@ final class NotyfBuilder extends NotificationBuilder
}
/**
* @param 'x'|'y' $position
* @param 'left'|'center'|'right'|'top'|'bottom' $value
*
* @phpstan-param ($position is 'x' ? "left"|"center"|"right" : "top"|"center"|"bottom") $value
*/
public function position(string $position, string $value): self
+1
View File
@@ -10,6 +10,7 @@ use Flasher\Prime\Notification\Type;
if (!\function_exists('Flasher\Notyf\Prime\notyf')) {
/**
* @param 'success'|'info'|'warning'|'error' $type
* @param array{
* duration?: int,
* ripple?: bool,
+1
View File
@@ -9,6 +9,7 @@ use Flasher\Prime\Notification\Type;
if (!function_exists('notyf')) {
/**
* @param 'success'|'info'|'warning'|'error' $type
* @param array{
* duration?: int,
* ripple?: bool,