Skip to content

Commit 89c6efd

Browse files
authored
Update readme (#112)
* Update readme. Fixes #110 * Update gitignore
1 parent ef18216 commit 89c6efd

File tree

2 files changed

+18
-7
lines changed

2 files changed

+18
-7
lines changed

.gitignore

+16-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,18 @@
1-
.DS_Store
1+
# Composer
22
composer.lock
3-
vendor
4-
.idea
5-
composer.phar
3+
/vendor
4+
5+
# PHPUnit
6+
/.phpunit.cache
67
.phpunit.result.cache
7-
build/
8+
9+
# IDEs
10+
/.fleet
11+
/.idea
12+
/.vscode
13+
14+
# Build artifacts and temporary files
15+
.DS_Store
16+
clover.xml
17+
/build
18+
/coverage

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -183,9 +183,9 @@ The following function uses the `htmlspecialchars` function
183183
with specific flags to ensure proper encoding:
184184

185185
```php
186-
function html(string $text = null): string
186+
function html(?string $text = null): string
187187
{
188-
return htmlspecialchars($text, ENT_QUOTES | ENT_SUBSTITUTE, 'UTF-8');
188+
return htmlspecialchars($text ?? '', ENT_QUOTES | ENT_SUBSTITUTE, 'UTF-8');
189189
}
190190
```
191191

0 commit comments

Comments
 (0)