hidenari / helper-sample
helper function sample
v1.6.4
2026-01-30 02:50 UTC
Requires
- php: ^8.5
Requires (Dev)
- laravel/pint: ^1.26
- pestphp/pest: ^4.1
- phpstan/phpstan: ^2.1
README
fizzbuzz function Sample on php version 8.5 or later.
about this package
function fizzbuzz(number)
When given a number, it returns string or number depending on the condition.
Conditions
-
If divisible by 3, it returns “fizz”.
-
If divisible by 5, it returns “buzz”.
-
Extends - If divisible by 30, it returns uppercase words.
Update Rules
When updating, execute the following command.
herd coverage ./vendor/bin/pest --coverage
./vendor/bin/pest
./vendor/bin/pint
./vendor/bin/phpstan analyse src --level=10
License
This utility is open-sourced software licensed under the MIT license.