Commit Graph

364 Commits

Author SHA1 Message Date
Laurent Destailleur
49f40b58fe Removed some warning (not priority) 2024-08-03 14:02:09 +02:00
MDW
63aab818e6 Qual: Fixes related to CMailFile for phan notices (#30510)
* Qual: Fix CMailFile related phan notices

# Qual: Fix CMailFile related phan notices

Fix several phan notices by typing and typing checks.

* Fix initialisation of CMailFile instantiation

* Update phan baseline

* Update mails_emailing.php

* Update mails_emailing.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2024-08-01 11:09:26 +02:00
MDW
5da6995a56 Qual: Update Phan baseline - Fix phpstan regex (#30504)
* Add missing escapes in regex

* Qual: Fix phpstan regex
2024-07-31 18:39:02 +02:00
Laurent Destailleur
b494d26f95 Merge branch '20.0' of git@github.com:Dolibarr/dolibarr.git into develop 2024-07-25 14:51:48 +02:00
Laurent Destailleur
5c9b808f3f Fix phan 2024-07-25 10:44:43 +02:00
Laurent Destailleur
c21313fc2c Fix phan 2024-07-23 19:19:27 +02:00
Frédéric FRANCE
ea416aac93 replace old syntax, rename pdf models with same class name (#30271)
* replace old syntax

* replace old syntax

* replace old syntax

* replace old syntax

* rename files with same class name

* rename files with same class name

* rename files with same class name

* rename files with same class name

* rename files with same class name

* rename files with same class name

* rename files with same class name

* rename files with same class name

* rename files with same class name

* rename files with same class name

* rename files with same class name

* fix class with same name

* fix class with same name

* clean code
2024-07-06 02:59:40 +02:00
Laurent Destailleur
8f5b98be43 Merge branch '20.0' of git@github.com:Dolibarr/dolibarr.git into develop 2024-06-25 13:50:27 +02:00
Laurent Destailleur
92bc6c9102 Eclude some phan warnings 2024-06-25 12:10:47 +02:00
Frédéric FRANCE
4eec08ac84 remove deprecated and copy phan ignore for octopus (#30136) 2024-06-23 19:35:16 +02:00
Frédéric FRANCE
865e6a0878 add phan ignore for octopus branch 20.0 (#30137) 2024-06-23 19:35:02 +02:00
Frédéric FRANCE
0f1ae42691 fix phan (#30113)
* fix phan

* Update project.class.php

* Update project.class.php

* try to fix

* try to fix

* try to fix

* try to fix

* try to fix
2024-06-22 15:36:10 +02:00
Frédéric FRANCE
ec9b48260e Update baseline.txt (#30127) 2024-06-22 15:30:07 +02:00
Laurent Destailleur
ec25b85e35 Exclude more phan warnings 2024-06-21 17:27:52 +02:00
Laurent Destailleur
eb537088ba Exclude phan error type that is for the moment too annoying to manage 2024-06-18 19:15:29 +02:00
Laurent Destailleur
ac0ba02036 Exclude false positive 2024-06-16 13:17:10 +02:00
Laurent Destailleur
8971c8efac Exclude phan rule 2024-06-03 21:30:25 +02:00
Laurent Destailleur
ed212d0e84 Fix errormessage 2024-05-31 15:57:03 +02:00
Laurent Destailleur
82908a30eb Clean phan warnings 2024-05-30 13:37:17 +02:00
Frédéric FRANCE
2f16e2347c fix phan (#29778)
* fix phan

* Update global.inc.php

* Update style.css.php
2024-05-28 23:53:06 +02:00
Laurent Destailleur
4b5b4c4e1a Clean some expected warnings 2024-05-13 12:49:14 +02:00
Laurent Destailleur
130c2e2a8f Clean code 2024-05-13 11:27:56 +02:00
Laurent Destailleur
d523cb24e6 Disable useless phan warnings 2024-05-10 11:48:27 +02:00
MDW
2115980560 Qual: Fix Phan notices in CommonObject (#29354)
* Fix PhanPluginSimplifyExpressionBool in commonobject

* Fix commonobject for phan notices

* Allow null for $usedolidb argument

* Allow null for $outputlangs argument of \dol_format_address()

* Fix multiple phan notices

* Ignore PhanTypeArraySuspiciousNullable

* Fix PhanTypeMismatchArgumentProbablyReal

* Update baseline

* Improve typings

* Update type specification getCountry/withCode

* Fix CommonObject Phan notices & update baseline

* Fix phan notices

* Correct typing for showInputField to be the same as parent class

* Fix PhanPluginSimplifyExpressionBool in commonobject

* Fix commonobject for phan notices

* Allow null for $usedolidb argument

* Allow null for $outputlangs argument of \dol_format_address()

* Fix multiple phan notices

* Ignore PhanTypeArraySuspiciousNullable

* Fix PhanTypeMismatchArgumentProbablyReal

* Update baseline

* Improve typings

* Update type specification getCountry/withCode

* Fix CommonObject Phan notices & update baseline

* Fix phan notices

* fixup! Correct typing for showInputField to be the same as parent class
2024-05-02 19:33:51 +02:00
Laurent Destailleur
1af7ad923c Fix phan 2024-04-28 21:56:41 +02:00
Frédéric FRANCE
26da44e254 fix phpstan (#29431)
* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan

* remove params not used

* add WARNING
2024-04-27 12:45:50 +02:00
Laurent Destailleur
2de1287afd Make CTI less paranoiac to avoid alert at any code change 2024-04-27 00:47:45 +02:00
Laurent Destailleur
ca65e9a333 QUAL the config_extended of phpstan will be kept on apstats only for the
moment: Too many CTI error not related to PR.
2024-04-24 21:44:58 +02:00
Laurent Destailleur
a669c3d3fa Disable PhanUndeclaredGlobalVariable 2024-04-24 20:56:41 +02:00
Laurent Destailleur
85b4077d0d Clean code 2024-04-24 20:35:36 +02:00
Laurent Destailleur
5166eee88c Clean code 2024-04-24 20:29:37 +02:00
Laurent Destailleur
7712a80c55 Fix phpstan 2024-04-24 16:48:05 +02:00
MDW
da9fd874bc Qual: Fix or ignore functions.lib.php phan notices (#29344)
* Fix: LogHandler parent class, implements interface & provides $code

* Fix: functions.lib phan notices

* Fix phan notifications

* Match expected DebugBar signature - rename getRenderer

* Call the correct renderer method for the DebugBar

* Use correct key type to access array

* Ignore notices

* Update functions.lib.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2024-04-14 04:46:33 +02:00
MDW
bc5e5b67af Qual: Update phan baseline (#29300)
* Qual: Update phan baseline

* Init variable to ensure it is defined

* Init $module_part to ensure it is defined

* Init $modulepart to ensure it is defined

* phpdoc typing for getNetNeeds and getNetNeedsTree

* Enforce type for phan

* Initialise  $massactionbutton so that it is defined

* phpdoc: improve typing

* Encore character_set value is string (for typing)

* fixup! Qual: Update phan baseline

* Fix duplicate code

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2024-04-12 01:06:52 +02:00
MDW
e171e8e7ef Qual: Fix all active phan notices in html.form.class.php (#29316) 2024-04-11 19:14:46 +02:00
MDW
4d496209ce Qual: Phan/apstats should not be using the standard baseline (#29267)
# Qual: Phan/apstats should not be using the standard baseline

Fix to get apstats reporting on the technical debt.  The 'baseline.txt'
is for the ci regression.  The code is changed to allow a
'baseline_extended.txt' which should not be generated, only hand-crafted
2024-04-07 15:02:00 +02:00
MDW
bbde552979 Qual: Enable Phan Rules and update baseline (#29255)
* Fix script generating trailing whitespace

* Add nusoap as a stub for better analysis

* Qual: Return type for fetch_name_optionals_label to fix phan message

* Qual: Enable Phan Rules and update baseline

# Qual: Enable Phan Rules and update baseline

This enables all of the rules that are currently also
enabled for cti, but sets the baseline to ignore the
exceptions already present.
This will help detect exceptions added by code modifications
if the rule is not ignored for the given file.
2024-04-07 11:55:39 +02:00
Laurent Destailleur
ba25317a97 Exclude PhanDeprecatedProperty for the moment 2024-04-05 10:22:01 +02:00
MDW
1c9c665b0b Update baseline (improved) 2024-03-27 10:18:41 +01:00
MDW
6e5841b13d Add checks on checkVal, price2num and GETPOSTFLOAT arguments 2024-03-27 10:18:41 +01:00
MDW
a703ea1092 Add checks on dol_(mktime|now|print_date) + avoid duplicate phan conf 2024-03-27 10:18:39 +01:00
MDW
fc43b5a252 Ignore PhanParamTooMany for adherents/admin/member.php
# Ignore PhanParamTooMany for adherents/admin/member.php

Ignore PhanParamTooMany for adherents/admin/member.php for passing CI;
The problem pre-exists and can be fixed later.
2024-03-27 10:18:14 +01:00
MDW
aba83e9e42 Add function definitions to stub 2024-03-27 10:18:11 +01:00
Laurent Destailleur
8bcfefe42f Update config_fixer.php 2024-03-24 16:39:25 +01:00
Laurent Destailleur
414c51d631 Update config_extended.php 2024-03-24 16:38:51 +01:00
Laurent Destailleur
d78bafe602 Update config_extended.php 2024-03-24 16:38:21 +01:00
Laurent Destailleur
c43bb3d52c Update config.php 2024-03-24 16:37:21 +01:00
MDW
a1ae115757 Set cache_codes global type 2024-03-24 15:40:25 +01:00
MDW
34416d9723 Qual: Enable PhanNonClassMethodCall 2024-03-24 15:06:59 +01:00
MDW
02960415cb Fix global typing of menumanager as MenuManager 2024-03-24 11:03:22 +01:00