mirror of
https://github.com/jupeter/clean-code-php.git
synced 2025-09-26 05:59:04 +02:00
Merge pull request #134 from DylanDelobel/master
Fix Php version for void type hinting
This commit is contained in:
@@ -375,7 +375,7 @@ function createMicrobrewery($name = null): void
|
|||||||
|
|
||||||
**Good:**
|
**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
|
```php
|
||||||
function createMicrobrewery(string $breweryName = 'Hipster Brew Co.'): void
|
function createMicrobrewery(string $breweryName = 'Hipster Brew Co.'): void
|
||||||
|
Reference in New Issue
Block a user