3 ms·
You just keep adding types, it gets better by time. When you do add types, go with strict types (strict_types=1). Type errors pop early when there are many type
by Ayesh 4y ago
You just keep adding types, it gets better by time. When you do add types, go with strict types (strict_types=1). Type errors pop early when there are many type enforcements.
When you find parts that you can't easily type (open file handlers for example), you can create wrappers that encapsulate the handlers.
Also, use phpstan/Phan or other static analyzers like others mentioned.