Commit graph

330 commits

Author SHA1 Message Date
github-actions[bot]
cac0e048ca
PHPStan > Update baseline (#39571)
Co-authored-by: Dolibot <dolibarr-bot@users.noreply.github.com>
2026-08-17 21:29:05 +02:00
Frédéric FRANCE
840538d702
FIX: Resolve possibly-undefined-variable cases flagged by PHPStan (#39523)
* FIX: Resolve possibly-undefined-variable cases flagged by PHPStan

Fixes several cases of the variable.undefined PHPStan rule instead of
just excluding them via the baseline: a wrong variable used to build a
delete link (dir_add_card.php), an uninitialized $result across a
try/catch (CMailFile), missing GETPOST reads ($mode, $fk_project/$date
reset via unset() creating cross-branch ambiguity), a missing $r
contract check (commonfieldsinimport.inc.php), missing @var/global
annotations for $conf/$langs/$bc, dead extrafields-display code
guarded by the wrong condition (expedition/card.php), and an
undefined $soc passed to formAddObjectLine() where objects have no
buyer thirdparty (replaced with null). Corresponding entries removed
from dev/build/phpstan/phpstan-baseline.neon.

* FIX: Resolve more possibly-undefined-variable cases flagged by PHPStan

Second batch of variable.undefined fixes removed from the baseline:
- Complex conditional flows PHPStan can't prove exhaustive (Stripe key
  selection in commoninvoice.class.php, a situation-invoice loop var in
  pdf_sponge.modules.php, a product loop var in stock/movement_list.php)
  fixed by adding a definite initialization before the ambiguous branch.
- A commented-out $linkback assignment restored in
  expensereport/payment/info.php.
- Missing GETPOST reads added (holiday/list.php update-date filters,
  product/stock/info.php $action/$socid, projet/comment.php $mode).
- A dead-code $mesg call to dol_htmloutput_mesg() removed from
  admin_hrm.php (messages are already shown via setEventMessages()).
- Redundant isset() checks removed in product/reassort.php and
  reassortlot.php where $type is unconditionally set earlier in the
  same file, so the isset()-false branch was unreachable dead code.
- $user documented as always available in public/bookcal/index.php
  (NOREQUIREUSER is not defined on that page).
- A genuinely missing $tmpcode initialization fixed in
  attendee_new.php, suggestbooth.php and suggestconference.php: when
  an existing thirdparty is reused (or SOCIETE_CODECLIENT_ADDON has no
  auto-numbering), $tmpcode was never set before being assigned to
  code_client/code_fournisseur.

* add phan fix

* add phan fix

* fix

* fix

* fix
2026-08-15 18:33:12 +02:00
github-actions[bot]
db45772fd9
PHPStan > Update baseline (#39408)
Co-authored-by: Dolibot <dolibarr-bot@users.noreply.github.com>
2026-08-06 17:50:40 +02:00
github-actions[bot]
f495b92d1f
PHPStan > Update baseline (#39193)
Co-authored-by: Dolibot <dolibarr-bot@users.noreply.github.com>
2026-07-19 16:17:31 +02:00
github-actions[bot]
e8227696b4
PHPStan > Update baseline (#39174)
Co-authored-by: Dolibot <dolibarr-bot@users.noreply.github.com>
2026-07-15 00:39:16 +02:00
github-actions[bot]
324179f373
PHPStan > Update baseline (#38974)
Co-authored-by: Dolibot <dolibarr-bot@users.noreply.github.com>
2026-06-23 20:13:28 +02:00
github-actions[bot]
6d21d3df56
PHPStan > Update baseline (#38823)
Co-authored-by: Dolibot <dolibarr-bot@users.noreply.github.com>
2026-06-15 14:57:55 +02:00
github-actions[bot]
277a38eff7
PHPStan > Update baseline (#38780)
Co-authored-by: Dolibot <dolibarr-bot@users.noreply.github.com>
2026-06-14 01:06:22 +02:00
github-actions[bot]
65233b182f
PHPStan > Update baseline (#38465)
Co-authored-by: Dolibot <dolibarr-bot@users.noreply.github.com>
2026-06-10 19:52:57 +02:00
github-actions[bot]
ade06212fe
PHPStan > Update baseline (#38436)
Co-authored-by: Dolibot <dolibarr-bot@users.noreply.github.com>
2026-05-26 05:17:58 +02:00
MDW
b34c5530d9
Qual: Fix PHPStan notices (#38388)
* Qual: Fix ftp related typing for PHPStan

* Qual: Fix multiple PHPStan notices

* Qual: Update PHPStan baseline
2026-05-22 11:22:11 +02:00
MDW
bc2a6c68f0
Qual: Fix PHPStan notice about menumanager (#38360)
* Qual: Fix PHPStan notice about menumanager

# Qual: Fix PHPStan notice about menumanager

Declare type for MenuManager $menumanager typically defined in menu.inc.php

* Qual: Update PHPStan baseline

# Qual: Update PHPStan baseline

Removed the warning for the undefined variable $menumanager in style.css.php.
2026-05-22 10:39:43 +02:00
MDW
1a66f03134
Qual: Update dol_ftp_connect return type for PHPStan (#38362)
# Qual: Update dol_ftp_connect return type for PHPStan

Fixes Phan notices in ftp/index.php

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2026-05-22 10:26:58 +02:00
MDW
bd1abf66e4
qual: Update return type annotations in Projects::getRoles() (#38338)
The return type annotations for the method Projects::getRoles() have been updated from array<object> to list<string> to better reflect the actual return type. This change was also reflected in the phpstan-baseline.neon file to maintain consistency.
2026-05-21 21:54:31 +02:00
MDW
0a64b8b47d
Qual: Update parameter type, fixes PHPStan, Phan (#38339)
# Qual: Update parameter type, fixes PHPStan, Phan

Updates the _cleanObjectDatasRate method parameter types.
2026-05-21 21:53:20 +02:00
MDW
24bba6caa9
Qual: Fix PHPStan for ldap, pgsql, odtphp (#38246)
# Qual: Fix PHPStan for ldap, pgsql, odtphp

- Adjust typing in ldap and pgsql class to fix PHPStan notices;
- Exclude all files for odtphp from analysis (external lib);
- Update PHPStan baseline.
2026-05-18 03:01:50 +02:00
Laurent Destailleur
461e65b069 Disable db check 2026-05-11 22:16:54 +02:00
MDW
63833674bb
Qual: Fix PHPStan notices (#38039)
* Qual: Fix PHPStan notices

# Qual: Fix PHPStan notices

Fix multiple PHPStan notices, mostly possibly undefined variable

* Qual: Fix Phan notices

* Qual: Fix Phan notice, $id declared before include

* Fix array initialisations

* Qual: Update phpstan baseline

* Qual: Fix Phan notices

* Qual: Update phan baseline
2026-05-11 20:39:31 +02:00
MDW
2e07d07aae
Qual: Update phpstan baseline (#38152) 2026-05-10 22:42:14 +02:00
MDW
8e2868c291
Qual: Fix PHPStan (array definition) (#38071)
* Qual: Fix PHPStan (array definition)

# Qual: Fix PHPStan (array definition)

More complete array definition for $TNetNeeds argument

* Qual: Update PHPStan baseline

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2026-05-04 17:36:05 +02:00
github-actions[bot]
6b75da47f9
PHPStan > Update baseline (#37975)
Co-authored-by: Dolibot <dolibarr-bot@users.noreply.github.com>
2026-04-23 14:13:08 +02:00
MDW
43a958b925
Qual: Fix CI notices after changes to fields type (#37934)
* Qual: CI notices after changes to fields type

# Qual: CI notices after changes to fields type

The phpstan regexes to ignore notices no longer matched because of the type change.
Update the code to fix the notices.

* Qual: Ignore false positive (Phan)
2026-04-20 12:38:14 +02:00
Frédéric FRANCE
495173f01a
clean code and phpstan (#37879)
* clean code and phpstan

* clean code and phpstan

* clean code and phpstan

* clean code and phpstan

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2026-04-15 15:55:05 +02:00
Frédéric FRANCE
ab40c92fbe
fix phpstan (#37872) 2026-04-14 19:43:00 +02:00
github-actions[bot]
d41209000c
PHPStan > Update baseline (#37851)
Co-authored-by: Dolibot <dolibarr-bot@users.noreply.github.com>
2026-04-13 16:15:36 +02:00
Frédéric FRANCE
d333b645a2
fix phpstan (#37833) 2026-04-13 12:52:37 +02:00
Frédéric FRANCE
45d0566b6f
clean code and fix phpstan (#37831)
* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan
2026-04-12 11:59:56 +02:00
Frédéric FRANCE
e239c4a644
fix phpstan (#37823)
* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan
2026-04-11 17:40:53 +02:00
Frédéric FRANCE
f971cb40c5
fix phpstan and clean baseline (#37770) 2026-04-07 12:41:18 +02:00
Frédéric FRANCE
9394cfe523
fix phpstan (#37679)
* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2026-04-03 05:51:19 +02:00
github-actions[bot]
392badd940
PHPStan > Update baseline (#37341)
Co-authored-by: Dolibot <dolibarr-bot@users.noreply.github.com>
2026-02-27 15:40:24 +01:00
github-actions[bot]
e199ef7cae
PHPStan > Update baseline (#37197)
Co-authored-by: Dolibot <dolibarr-bot@users.noreply.github.com>
2026-02-11 21:15:15 +01:00
Frédéric FRANCE
9ac93e1e98
fix phpstan errors blocking action baseline (#37189)
* fix phpstan errors blocking action baseline

* fix phpstan errors blocking action baseline

* fix phpstan errors blocking action baseline

* fix phpstan errors blocking action baseline

* fix phpstan errors blocking action baseline

* refresh baseline
2026-02-11 00:52:15 +01:00
Frédéric FRANCE
d3dbfd8c6e
Add thumbnails for avif (#37045)
* vignette for avif

* vignette for avif

* vignette for avif

* vignette for avif

* vignette for avif

* vignette for avif

* vignette for avif

* vignette for avif

* vignette for avif

* vignette for avif

* vignette for avif

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2026-02-01 19:07:15 +01:00
github-actions[bot]
35602c6ff4
PHPStan > Update baseline (#36876)
Co-authored-by: Dolibot <dolibarr-bot@users.noreply.github.com>
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2026-01-15 01:28:31 +01:00
github-actions[bot]
84ac2a32ee
PHPStan > Update baseline (#36852)
Co-authored-by: Dolibot <dolibarr-bot@users.noreply.github.com>
2026-01-12 16:05:40 +01:00
Frédéric FRANCE
5509203cef
clean code (#36819) 2026-01-07 11:07:31 +01:00
github-actions[bot]
192b5525af
PHPStan > Update baseline (#36809)
Co-authored-by: Dolibot <dolibarr-bot@users.noreply.github.com>
2026-01-06 14:48:25 +01:00
Laurent Destailleur
d2b68aac97 Fix warning 2026-01-05 16:46:10 +01:00
Frédéric FRANCE
f138005d73
clean code 2025-12-20 10:39:39 +01:00
Dolibot
5f89a4a2d2 PHPStan > Update baseline 2025-12-12 12:10:57 +00:00
Dolibot
56c6b48eff PHPStan > Update baseline 2025-12-09 12:11:04 +00:00
Dolibot
b31f16c18f PHPStan > Update baseline 2025-11-29 12:09:23 +00:00
MDW
b33386ba0d
qual: Update phpstan-baseline.neon to remove unresolvable type issues
Removed multiple entries related to unresolvable types in dol_sort_array function calls and property assignments.
2025-11-27 22:38:56 +01:00
github-actions[bot]
853c7a2c8d
PHPStan > Update baseline (#36374)
Co-authored-by: Dolibot <dolibarr-bot@users.noreply.github.com>
2025-11-22 19:47:22 +01:00
Frédéric FRANCE
46d6714fe0
clean code (#36317)
* clean code

* clean code

* clean doc

* clean doc

* clean doc

* clean doc

* fix

* fix

* fix

* fix

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-11-20 01:47:46 +01:00
Frédéric FRANCE
d5e641e248
fix doc subtotal tpl (#36326)
* fix subtotal create tpl

* fix subtotal create tpl

* property errors is always set

* clean baseline
2025-11-19 19:21:19 +01:00
github-actions[bot]
3cd79f4497
PHPStan > Update baseline (#36305)
Co-authored-by: Dolibot <dolibarr-bot@users.noreply.github.com>
2025-11-19 14:16:21 +01:00
Frédéric FRANCE
8d459e469d
clean code (#36260)
* clean code

* clean code

* clean code

* clean code

* fix $val might not be defined

* fix phpstan errors reported

* fix phpstan errors reported

* fix phpstan errors reported

* fix phpstan errors reported

* fix phpstan errors reported

* fix phpstan errors reported

* ignore phpstan reported for later

* clean code

* clean code

* clean code

* clean

* test
2025-11-18 11:41:28 +01:00
github-actions[bot]
f799113fac
PHPStan > Update baseline (#36264)
Co-authored-by: Dolibot <dolibarr-bot@users.noreply.github.com>
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-11-17 21:47:22 +01:00