Commit Graph

132 Commits

Author SHA1 Message Date
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
MDW
79a8533f53
Qual: Enable PhanTypeInvalidPropertyName 2024-03-24 11:03:02 +01:00
MDW
2a13f7134c
Qual: Add extra phan stubs fixing PhanUndeclaredClassMethod 2024-03-23 14:29:54 +01:00
MDW
30b7ae336f
Qual: Enable dev/tools/phan/config.php 2024-03-23 13:14:35 +01:00
MDW
09b931e8fc
Qual: Enable PhanUndeclaredClassProperty 2024-03-23 03:19:04 +01:00
MDW
f96819398f
Add stub for multicompany 2024-03-23 03:19:03 +01:00
MDW
27091da3f3
Qual: Enable lidLeftOperandOfNumericOp 2024-03-23 02:06:57 +01:00
MDW
5c073dfb6e
Qual: Enable PhanTypeInvalidRightOperandOfAdd 2024-03-22 09:52:42 +01:00
MDW
b53d322f1b
Add exception for PhanTypeInvalidRightOperandOfAdd to baseline because issue to handle later 2024-03-22 09:52:34 +01:00
MDW
b8c16af0a3
Qual: Enable PhanTypeInvalidLeftOperandOfAdd 2024-03-22 09:51:38 +01:00
MDW
3908b4df9d
Qual: Enable PhanTypeInvalidLeftOperandOfBitwiseOp (all fixed) 2024-03-21 13:44:54 +01:00
MDW
6bfdc4655f
Disable ignores phan's baseline.txt (fixed) 2024-03-20 21:58:43 +01:00
MDW
9b146f3fe1
Fix restler stub ApiMethodInfo typing 2024-03-20 04:10:11 +01:00
MDW
a69dcc9c5a
Qual: Enable PhanTypeMismatchArgumentSuperType 2024-03-20 04:09:19 +01:00
MDW
390d164f82
Qual: Ignore PhanTypeMismatchArgumentNullableInternal 2024-03-20 04:09:18 +01:00
MDW
6413341c96
Qual: Enable PhanTypeMismatchArgumentInternal 2024-03-20 04:09:17 +01:00
MDW
04d7142463
Disable HTML plugin (detects HTML in PHP files)
# Disable HTML plugin (detects HTML in PHP files)

These messages are not really useful for dolibarr.
2024-03-19 18:09:19 +01:00
MDW
cd3ea72f96
Qual: Disable global variable suggestion for $website 2024-03-19 02:44:07 +01:00
MDW
3c968477cb
Change type of global $website to string 2024-03-19 02:44:04 +01:00
MDW
921431dbdc
Qual: Enable PhanTypeSuspiciousStringExpression 2024-03-19 02:44:03 +01:00
Laurent Destailleur
29a858aa68
Merge pull request #28924 from mdeweerd/fix/whitespace
Fix trailing whitespace + format code + minor spelling + enable checks
2024-03-19 02:14:13 +01:00
MDW
d2568a0878
Qual: Enable PhanUndeclaredVariableAssignOp 2024-03-18 13:12:53 +01:00
MDW
686facd74d
Fix PhanPluginWhitespaceTrailing + format code + minor spelling 2024-03-17 21:35:08 +01:00
MDW
aa6c20bf0d
Qual: Enable PhanPluginWhitespaceTrailing 2024-03-17 21:35:07 +01:00
Laurent Destailleur
bb0e18deae
Merge pull request #28922 from mdeweerd/fix/printf
Fix & enable Phan printf checks
2024-03-17 21:08:26 +01:00
MDW
7a4f5ec4f8
Qual: Enable some low occurence notifications 2024-03-17 20:12:27 +01:00
MDW
aa5aa2bf26
Add one more index to the theme_datacolor 2024-03-17 19:49:10 +01:00
MDW
d73886281c
Qual: Set typing for global 2024-03-17 18:56:44 +01:00
MDW
81d5f30466
Qual: Enable PhanPluginPrintfIncompatibleArgumentType 2024-03-17 18:56:43 +01:00
MDW
4232713e96
Qual: enable PhanPluginPrintfVariableFormatString 2024-03-17 18:21:35 +01:00
Laurent Destailleur
91c5868020
Merge pull request #28909 from mdeweerd/fix/PhanPluginUnknownClosureReturnType
Fix & enable PhanPluginUnknownClosureReturnType
2024-03-17 03:03:35 +01:00
MDW
551eaa115c
Fix & enable PhanPluginUnknownClosureReturnType
# Fix & enable PhanPluginUnknownClosureReturnType

Fix last PhanPluginUnknownClosureReturnType & enable the notice as
all are fixed
2024-03-17 00:10:18 +01:00
MDW
ef6eea3ed2
Qual: Fix PhanTypeExpectedObjectOrClassName by testing on classname
# Qual: Fix PhanTypeExpectedObjectOrClassName by testing on classname

PhanTypeExpectedObjectOrClassName should be fixed by testing that the classname is not
empty.
2024-03-17 00:03:20 +01:00