Commit Graph

18 Commits

Author SHA1 Message Date
MDW
42bb4fbf3e
Qual: Enable & fix or ignore Invalid DimOffset (#31176)
* Qual: Enable & fix or ignore Invalid DimOffset

# Qual: Enable & fix or ignore Invalid DimOffset

The Invalid DimOffset notices occur when array keys are defined and
the index used is not amongst the known array keys.

This PR enables these notices and fixes array definitions when needed,
or ignores the notices locally if it's a false positive, or in the
baseline.txt when it does not seem to be a false positive so that
it can be fixed later

* Nullable object typing in function signature not ok for 7.0/8.4

Can't user '?User' as argument type for PHP7.0 which is required by PHP8.4.
Therefore, removing the typing specification in the function definition

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2024-09-29 21:52:31 +02:00
MDW
6502101546
Fix PhanTypeInvalid{Left,Right}OperandOfNumericOp mostly by typing, casting, idate 2024-03-23 02:06:43 +01:00
MDW
c7c0d77dc8
Fix typing with casts 2024-03-22 09:51:48 +01:00
MDW
61bd47623d
Fix arg type to strlen() with cast 2024-03-19 20:38:58 +01:00
MDW
34e960f7ad
Fix arg types for substr() by casting to string 2024-03-19 02:59:17 +01:00
thibdrev
94da5b08ae
Merge branch 'Dolibarr:develop' into patch-7 2024-01-28 13:35:30 +01:00
thibdrev
fdfbe63e8f
qual: Update profid.lib.php - Update isValidTinForES() documentation 2024-01-27 13:44:43 +01:00
thibdrev
9064729884
qual: profid.lib.php - Belgium Numéro d'Entreprise shall start with 0 or 1
According to: https://economie.fgov.be/fr/themes/entreprises/banque-carrefour-des/actualites/structure-du-numero
> se présente sous la forme Zxxx.xxx.xxx, le premier chiffre étant 0 ou 1.
2024-01-26 13:19:40 +01:00
MDW
89004f7e03
Qual: Spelling htdocs/core (#27491)
Highlights:
- initialY in pdf_standard.modules.php was unused
  - remove (otherwise -> initially) (+same in other file)
2024-01-13 19:48:20 +01:00
thibdrev
96383a10a5
qual: move the function checking the syntax of Spanish Tax Identification Numbers (CIF, NIF, NIE) to profid.lib.php (#27472)
* qual: Move the function checking Spanish Tax Identification Numbers from societe.class.php to profid.lib.php

Create the function isValidTinForES($str)

* qual: Update societe.class.php using function isValidTinForES($str) from profid.lib.php

* phpcs

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2024-01-12 20:59:42 +01:00
thibdrev
dd2a3c05d9
qual: move into profid.lib.php the code checking the idprof1 syntax for BE, DZ and PT (#27443)
* qual: Update profid.lib.php - move functions checking profid from societe.class.php

- One function checking the Tax Identification Number for PT (called NIF)
- One function checking the Tax Identification Number for DZ (called NIF)
- One function checking the Tax Identification Number for BE (called NN)

* qual: Update societe.class.php - use the isValidTinXX() functions from profid.lib.php

isValidTinForPT($this->idprof1)
isValidTinForDZ($this->idprof1)
isValidTinForBE($this->idprof1)

* typo
2024-01-12 17:53:29 +01:00
thibdrev
d3416b864c
Fix: SIRET syntax check - Handle the specific case of "La Poste" businesses (#27418)
* fix: SIRET syntax check - Handle the specific case of "La Poste" businesses

* phpcs

* phpcs

* typo
2024-01-11 12:49:39 +01:00
thibdrev
f9a5b9a6dd
qual: Update profid.lib.php - use the Luhn agorithm instead within isValidSiren() and isValidSiret() (#27405) 2024-01-11 10:14:06 +01:00
thibdrev
37871169ba
phpcs 2024-01-08 14:08:49 +01:00
thibdrev
a7dc286784
Update profid.lib.php - Copy the algorithm to validate a SIRET 2024-01-08 14:01:37 +01:00
Laurent Destailleur
bbf687da0c Fix warning 2024-01-05 03:08:16 +01:00
thibdrev
beb5ca0d85
Travis CI - Undefined variable $chaine 2023-12-22 11:02:37 +01:00
thibdrev
026b73af8e
Creation of profid.lib.php by moving the SIREN validation function from /htdocs/societe/class/societe.class.php 2023-12-21 17:38:05 +01:00