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

change type hinting url

This commit is contained in:
Igor Popov
2022-05-19 11:30:44 +03:00
parent 5397e74276
commit fe8d53bdef

View File

@@ -1103,7 +1103,7 @@ function travelToTexas(Vehicle $vehicle): void
If you are working with basic primitive values like strings, integers, and arrays, If you are working with basic primitive values like strings, integers, and arrays,
and you use PHP 7+ and you can't use polymorphism but you still feel the need to and you use PHP 7+ and you can't use polymorphism but you still feel the need to
type-check, you should consider type-check, you should consider
[type declaration](http://php.net/manual/en/functions.arguments.php#functions.arguments.type-declaration) [type declaration](https://www.php.net/manual/en/language.types.declarations.php)
or strict mode. It provides you with static typing on top of standard PHP syntax. or strict mode. It provides you with static typing on top of standard PHP syntax.
The problem with manually type-checking is that doing it will require so much The problem with manually type-checking is that doing it will require so much
extra verbiage that the faux "type-safety" you get doesn't make up for the lost extra verbiage that the faux "type-safety" you get doesn't make up for the lost