fix phpstan (#31597)

* fix phpstan

* fix phpstan

* fix phpstan
This commit is contained in:
Frédéric FRANCE 2024-10-28 00:53:03 +01:00 committed by GitHub
parent 0bcb54fd7e
commit 475976a733
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
10 changed files with 19 additions and 22 deletions

View File

@ -1,6 +1,6 @@
<?php
/* Copyright (C) 2008-2014 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2022 Frédéric France <frederic.france@netlogic.fr>
* Copyright (C) 2022-2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
*
* This program is free software; you can redistribute it and/or modify
@ -28,10 +28,9 @@
/**
* Prepare array with list of different ecm main dashboard
*
* @param object $object Object related to tabs
* @return array<array{0:string,1:string,2:string}> Array of tabs to show
*/
function ecm_prepare_dasboard_head($object)
function ecm_prepare_dasboard_head()
{
global $langs, $conf, $user, $form;
@ -73,9 +72,9 @@ function ecm_prepare_dasboard_head($object)
// Entries must be declared in modules descriptor with line
// $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab
// $this->tabs = array('entity:-tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to remove a tab
complete_head_from_modules($conf, $langs, $object, $head, $h, 'ecm');
complete_head_from_modules($conf, $langs, null, $head, $h, 'ecm');
complete_head_from_modules($conf, $langs, $object, $head, $h, 'ecm', 'remove');
complete_head_from_modules($conf, $langs, null, $head, $h, 'ecm', 'remove');
return $head;
}
@ -84,9 +83,9 @@ function ecm_prepare_dasboard_head($object)
/**
* Prepare array with list of tabs
*
* @param object $object Object related to tabs
* @param string $module Module
* @param string $section Section
* @param EcmDirectory $object Object related to tabs
* @param string $module Module
* @param string $section Section
* @return array<array{0:string,1:string,2:string}> Array of tabs to show
*/
function ecm_prepare_head($object, $module = 'ecm', $section = '')
@ -113,12 +112,12 @@ function ecm_prepare_head($object, $module = 'ecm', $section = '')
/**
* Prepare array with list of tabs
*
* @param Object $object Object related to tabs
* @param EcmFiles $object Object related to tabs
* @return array<array{0:string,1:string,2:string}> Array of tabs to show
*/
function ecm_file_prepare_head($object)
{
global $langs, $conf, $user;
global $langs;
$h = 0;
$head = array();
@ -149,7 +148,7 @@ function ecm_file_prepare_head($object)
/**
* Prepare array with list of tabs
*
* @param object $object Object related to tabs
* @param EcmDirectory $object Object related to tabs
* @return array<array{0:string,1:string,2:string}> Array of tabs to show
*/
function ecm_prepare_head_fm($object)

View File

@ -334,7 +334,7 @@ $moreheadjs .= '</script>'."\n";
llxHeader($moreheadcss.$moreheadjs, $langs->trans("ECMArea"), '', '', 0, 0, $morejs, '', '', 'mod-ecm page-index');
$head = ecm_prepare_dasboard_head(null);
$head = ecm_prepare_dasboard_head();
print dol_get_fiche_head($head, 'index', '', -1, '');

View File

@ -409,7 +409,7 @@ if (!getDolGlobalString('ECM_AUTO_TREE_HIDEN')) {
}
}
$head = ecm_prepare_dasboard_head(null);
$head = ecm_prepare_dasboard_head();
print dol_get_fiche_head($head, 'index_auto', '', -1, '');

View File

@ -304,7 +304,7 @@ $moreheadjs .= '</script>'."\n";
llxHeader($moreheadcss.$moreheadjs, $langs->trans("ECMArea"), '', '', 0, 0, $morejs, '', '', 'mod-ecm page-index_medias');
$head = ecm_prepare_dasboard_head(null);
$head = ecm_prepare_dasboard_head();
print dol_get_fiche_head($head, 'index_medias', '', -1, '');

View File

@ -1,5 +1,5 @@
-- ===================================================================
-- Copyright (C) 2020 Frédéric France <frederic.france@netlogic.fr>
-- Copyright (C) 2020 Frédéric France <frederic.france@free.fr>
--
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by

View File

@ -1,5 +1,5 @@
-- ========================================================================
-- Copyright (C) 2020 Frédéric France <frederic.france@netlogic.fr>
-- Copyright (C) 2020 Frédéric France <frederic.france@free.fr>
--
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
@ -23,4 +23,3 @@ CREATE TABLE llx_ecm_directories_extrafields
fk_object integer NOT NULL,
import_key varchar(14) -- import key
) ENGINE=innodb;

View File

@ -1,5 +1,5 @@
-- ===================================================================
-- Copyright (C) 2020 Frédéric France <frederic.france@netlogic.fr>
-- Copyright (C) 2020 Frédéric France <frederic.france@free.fr>
--
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by

View File

@ -1,5 +1,5 @@
-- ========================================================================
-- Copyright (C) 2020 Frédéric France <frederic.france@netlogic.fr>
-- Copyright (C) 2020 Frédéric France <frederic.france@free.fr>
--
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
@ -23,4 +23,3 @@ CREATE TABLE llx_ecm_files_extrafields
fk_object integer NOT NULL,
import_key varchar(14) -- import key
) ENGINE=innodb;

View File

@ -1,5 +1,5 @@
<?php
/* Copyright (C) 2021 Frédéric France <frederic.france@netlogic.fr>
/* Copyright (C) 2021-2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
*
* This program is free software: you can redistribute it and/or modify

View File

@ -101,7 +101,7 @@ parameters:
- '# (Odf) constructor expects #'
- '# Stripe[^ ]+::all\(\) expects #'
- '#expects resource#'
- '# (?:(?:BordereauChequeBlochet::_pagefoot|(?:Order|Product|SupplierOrder)s::_cleanObjectDatas)\(\)|ecm_prepare_dasboard_head|formatObject) expects object#'
- '# (?:(?:BordereauChequeBlochet::_pagefoot|(?:Order|Product|SupplierOrder)s::_cleanObjectDatas)\(\)|formatObject) expects object#'
- '#(?:ftp_(?:c(?:dup|hdir|lose)|delete|get|mkdir|put|rmdir)) expects FTP\\Connection#'
- '#(?:ldap_(?:(?:ad|bin)d|delete|err(?:no|or)|first_entry|get_(?:(?:attribut|entri)es|(?:optio|values_le)n)|mod_(?:add|del|replace)|rename|set_option|unbind)) expects LDAP\\Connection#'
- '#(?:MultiCurrencies::_cleanObjectDatasRate\(\)) expects MultiCurrency#'