diff --git a/.gitignore b/.gitignore index 78f83f7..d1e4bf6 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,18 @@ -.DS_Store +# Composer composer.lock -vendor -.idea -composer.phar +/vendor + +# PHPUnit +/.phpunit.cache .phpunit.result.cache -build/ \ No newline at end of file + +# IDEs +/.fleet +/.idea +/.vscode + +# Build artifacts and temporary files +.DS_Store +clover.xml +/build +/coverage diff --git a/README.md b/README.md index 2bf515c..6c90e00 100644 --- a/README.md +++ b/README.md @@ -183,9 +183,9 @@ The following function uses the `htmlspecialchars` function with specific flags to ensure proper encoding: ```php -function html(string $text = null): string +function html(?string $text = null): string { - return htmlspecialchars($text, ENT_QUOTES | ENT_SUBSTITUTE, 'UTF-8'); + return htmlspecialchars($text ?? '', ENT_QUOTES | ENT_SUBSTITUTE, 'UTF-8'); } ```