fix: PHP CS Fixer (43 fichiers) + PHPStan level 6 zero erreurs + JS SonarQube
PHP CS Fixer : - 43 fichiers corriges (imports, docblocks, formatting) PHPStan level 6 (45 erreurs corrigees) : - ComptabiliteController/DevisController : cast User via @var - StatsController : cast float pour operations arithmetiques - AdvertService/DevisService/FactureService : @return array shape - PaymentReminderCommand : default arm dans match - Stripe SDK : @phpstan-ignore-next-line (5 occurrences) - MailerService : suppression ?? redondants sur offsets existants - SentryService : fix types retour, dead code - DnsCheckService/GoogleSearchService : @param value types - LegalController : suppression statement inatteignable - ActionService : @phpstan-ignore propriete non lue - Pdf/AdvertPdf/FacturePdf : @phpstan-ignore methodes inutilisees JS SonarQube : - app.js : isNaN -> Number.isNaN, replace -> replaceAll (5 occurrences) - app.js : extraction ternaire imbrique en if/else if - app.js : refactor SIRET search (nesting 5->3 niveaux) - entreprise-search.js : parseInt -> Number.parseInt - app.test.js : extraction trackListener (complexite cognitive 17->12) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -6,7 +6,7 @@ const API_URL = '/admin/clients/entreprise-search'
|
||||
|
||||
const computeTva = (siren) => {
|
||||
if (!siren) return ''
|
||||
const key = (12 + 3 * (parseInt(siren, 10) % 97)) % 97
|
||||
const key = (12 + 3 * (Number.parseInt(siren, 10) % 97)) % 97
|
||||
return 'FR' + String(key).padStart(2, '0') + siren
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user