Skip to content

Commit

Permalink
Update readme (#112)
Browse files Browse the repository at this point in the history
* Update readme. Fixes #110

* Update gitignore
  • Loading branch information
odan committed Aug 29, 2024
1 parent ef18216 commit 89c6efd
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 7 deletions.
21 changes: 16 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,18 @@
.DS_Store
# Composer
composer.lock
vendor
.idea
composer.phar
/vendor

# PHPUnit
/.phpunit.cache
.phpunit.result.cache
build/

# IDEs
/.fleet
/.idea
/.vscode

# Build artifacts and temporary files
.DS_Store
clover.xml
/build
/coverage
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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');
}
```

Expand Down

0 comments on commit 89c6efd

Please sign in to comment.