Aller au contenu

Unnamed boolean argument (ARCH7185)

Ce contenu n’est pas encore disponible dans votre langue.

Key php.quality.named-boolean-parameter · Severity info · Category quality

Bare true/false arguments at a call hide what they control. Use PHP 8 named arguments or introduce an enum.

<?php
$report = generateReport($data, true, false);
<?php
$report = generateReport($data, includeTotals: true, draft: false);

Use named arguments at the call site, or replace the boolean flag with an enum.