1
0
mirror of https://github.com/jupeter/clean-code-php.git synced 2025-09-25 21:49:04 +02:00

Merge pull request #134 from DylanDelobel/master

Fix Php version for void type hinting
This commit is contained in:
Tomáš Votruba
2017-12-29 17:03:42 +01:00
committed by GitHub

View File

@@ -375,7 +375,7 @@ function createMicrobrewery($name = null): void
**Good:**
If you support only PHP 7+, then you can use [type hinting](http://php.net/manual/en/functions.arguments.php#functions.arguments.type-declaration) and be sure that the `$breweryName` will not be `NULL`.
You can use [type hinting](http://php.net/manual/en/functions.arguments.php#functions.arguments.type-declaration) and be sure that the `$breweryName` will not be `NULL`.
```php
function createMicrobrewery(string $breweryName = 'Hipster Brew Co.'): void