mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
fix phpstan
This commit is contained in:
parent
429f5db55a
commit
cbefb5a2d8
|
|
@ -13776,48 +13776,6 @@ parameters:
|
|||
count: 1
|
||||
path: ../../../htdocs/core/modules/modEventOrganization.class.php
|
||||
|
||||
-
|
||||
message: '#^Property DolibarrModules\:\:\$const \(array\<array\{0\: string, 1\: string, 2\: int\|string, 3\: string, 4\?\: int\<0, 1\>, 5\?\: string, 6\?\: int\<0, 1\>\}\>\) does not accept non\-empty\-array\<array\{''DELIVERY_ADDON_PDF'', ''chaine''\}\|array\{0\: string, 1\: string, 2\: int\|string, 3\: string, 4\?\: int\<0, 1\>, 5\?\: string, 6\?\: int\<0, 1\>\}\>\.$#'
|
||||
identifier: assign.propertyType
|
||||
count: 1
|
||||
path: ../../../htdocs/core/modules/modExpedition.class.php
|
||||
|
||||
-
|
||||
message: '#^Property DolibarrModules\:\:\$const \(array\<array\{0\: string, 1\: string, 2\: int\|string, 3\: string, 4\?\: int\<0, 1\>, 5\?\: string, 6\?\: int\<0, 1\>\}\>\) does not accept non\-empty\-array\<array\{''DELIVERY_ADDON_PDF…'', ''chaine''\}\|array\{0\: string, 1\: string, 2\: int\|string, 3\: string, 4\?\: int\<0, 1\>, 5\?\: string, 6\?\: int\<0, 1\>\}\>\.$#'
|
||||
identifier: assign.propertyType
|
||||
count: 1
|
||||
path: ../../../htdocs/core/modules/modExpedition.class.php
|
||||
|
||||
-
|
||||
message: '#^Property DolibarrModules\:\:\$const \(array\<array\{0\: string, 1\: string, 2\: int\|string, 3\: string, 4\?\: int\<0, 1\>, 5\?\: string, 6\?\: int\<0, 1\>\}\>\) does not accept non\-empty\-array\<array\{''DELIVERY_ADDON…'', ''chaine''\}\|array\{0\: string, 1\: string, 2\: int\|string, 3\: string, 4\?\: int\<0, 1\>, 5\?\: string, 6\?\: int\<0, 1\>\}\>\.$#'
|
||||
identifier: assign.propertyType
|
||||
count: 1
|
||||
path: ../../../htdocs/core/modules/modExpedition.class.php
|
||||
|
||||
-
|
||||
message: '#^Property DolibarrModules\:\:\$const \(array\<array\{0\: string, 1\: string, 2\: int\|string, 3\: string, 4\?\: int\<0, 1\>, 5\?\: string, 6\?\: int\<0, 1\>\}\>\) does not accept non\-empty\-array\<array\{''EXPEDITION_ADDON_PDF'', ''chaine''\}\|array\{0\: string, 1\: string, 2\: int\|string, 3\: string, 4\?\: int\<0, 1\>, 5\?\: string, 6\?\: int\<0, 1\>\}\>\.$#'
|
||||
identifier: assign.propertyType
|
||||
count: 1
|
||||
path: ../../../htdocs/core/modules/modExpedition.class.php
|
||||
|
||||
-
|
||||
message: '#^Property DolibarrModules\:\:\$const \(array\<array\{0\: string, 1\: string, 2\: int\|string, 3\: string, 4\?\: int\<0, 1\>, 5\?\: string, 6\?\: int\<0, 1\>\}\>\) does not accept non\-empty\-array\<array\{''EXPEDITION_ADDON…'', ''chaine''\}\|array\{0\: string, 1\: string, 2\: int\|string, 3\: string, 4\?\: int\<0, 1\>, 5\?\: string, 6\?\: int\<0, 1\>\}\>\.$#'
|
||||
identifier: assign.propertyType
|
||||
count: 2
|
||||
path: ../../../htdocs/core/modules/modExpedition.class.php
|
||||
|
||||
-
|
||||
message: '#^Property DolibarrModules\:\:\$const \(array\<array\{0\: string, 1\: string, 2\: int\|string, 3\: string, 4\?\: int\<0, 1\>, 5\?\: string, 6\?\: int\<0, 1\>\}\>\) does not accept non\-empty\-array\<array\{''MAIN_SUBMODULE…'', ''chaine''\}\|array\{0\: string, 1\: string, 2\: int\|string, 3\: string, 4\?\: int\<0, 1\>, 5\?\: string, 6\?\: int\<0, 1\>\}\>\.$#'
|
||||
identifier: assign.propertyType
|
||||
count: 1
|
||||
path: ../../../htdocs/core/modules/modExpedition.class.php
|
||||
|
||||
-
|
||||
message: '#^Property DolibarrModules\:\:\$const \(array\<array\{0\: string, 1\: string, 2\: int\|string, 3\: string, 4\?\: int\<0, 1\>, 5\?\: string, 6\?\: int\<0, 1\>\}\>\) does not accept non\-empty\-array\<array\{0\: string, 1\: string, 2\: int\|string, 3\?\: string, 4\?\: int\<0, 1\>, 5\?\: string, 6\?\: int\<0, 1\>\}\>\.$#'
|
||||
identifier: assign.propertyType
|
||||
count: 7
|
||||
path: ../../../htdocs/core/modules/modExpedition.class.php
|
||||
|
||||
-
|
||||
message: '#^Variable \$user in empty\(\) always exists and is not falsy\.$#'
|
||||
identifier: empty.variable
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
* Copyright (C) 2005-2011 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2013 Philippe Grand <philippe.grand@atoo-net.com>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024-2025 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
|
||||
|
|
@ -62,14 +62,15 @@ class modExpedition extends DolibarrModules
|
|||
$this->picto = "dolly";
|
||||
|
||||
// Data directories to create when module is enabled
|
||||
$this->dirs = array("/expedition/temp",
|
||||
"/expedition/sending",
|
||||
"/expedition/sending/temp",
|
||||
"/expedition/receipt",
|
||||
"/expedition/receipt/temp",
|
||||
"/doctemplates/shipments",
|
||||
"/doctemplates/deliveries"
|
||||
);
|
||||
$this->dirs = array(
|
||||
"/expedition/temp",
|
||||
"/expedition/sending",
|
||||
"/expedition/sending/temp",
|
||||
"/expedition/receipt",
|
||||
"/expedition/receipt/temp",
|
||||
"/doctemplates/shipments",
|
||||
"/doctemplates/deliveries",
|
||||
);
|
||||
|
||||
// Config pages
|
||||
$this->config_page_url = array("expedition.php");
|
||||
|
|
@ -81,66 +82,65 @@ class modExpedition extends DolibarrModules
|
|||
$this->langfiles = array('deliveries', 'sendings');
|
||||
|
||||
// Constants
|
||||
$this->const = array();
|
||||
$r = 0;
|
||||
|
||||
$this->const[$r][0] = "EXPEDITION_ADDON_PDF";
|
||||
$this->const[$r][1] = "chaine";
|
||||
$this->const[$r][2] = "espadon";
|
||||
$this->const[$r][3] = 'Nom du gestionnaire de generation des bons expeditions en PDF';
|
||||
$this->const[$r][4] = 0;
|
||||
$r++;
|
||||
|
||||
$this->const[$r][0] = "EXPEDITION_ADDON_NUMBER";
|
||||
$this->const[$r][1] = "chaine";
|
||||
$this->const[$r][2] = "mod_expedition_safor";
|
||||
$this->const[$r][3] = 'Name for numbering manager for shipments';
|
||||
$this->const[$r][4] = 0;
|
||||
$r++;
|
||||
|
||||
$this->const[$r][0] = "EXPEDITION_ADDON_PDF_ODT_PATH";
|
||||
$this->const[$r][1] = "chaine";
|
||||
$this->const[$r][2] = "DOL_DATA_ROOT/doctemplates/shipments";
|
||||
$this->const[$r][3] = "";
|
||||
$this->const[$r][4] = 0;
|
||||
$r++;
|
||||
|
||||
$this->const[$r][0] = "DELIVERY_ADDON_PDF";
|
||||
$this->const[$r][1] = "chaine";
|
||||
$this->const[$r][2] = "storm";
|
||||
$this->const[$r][3] = 'Nom du gestionnaire de generation des bons de reception en PDF';
|
||||
$this->const[$r][4] = 0;
|
||||
$r++;
|
||||
|
||||
$this->const[$r][0] = "DELIVERY_ADDON_NUMBER";
|
||||
$this->const[$r][1] = "chaine";
|
||||
$this->const[$r][2] = "mod_delivery_jade";
|
||||
$this->const[$r][3] = 'Nom du gestionnaire de numerotation des bons de reception';
|
||||
$this->const[$r][4] = 0;
|
||||
$r++;
|
||||
|
||||
$this->const[$r][0] = "DELIVERY_ADDON_PDF_ODT_PATH";
|
||||
$this->const[$r][1] = "chaine";
|
||||
$this->const[$r][2] = "DOL_DATA_ROOT/doctemplates/deliveries";
|
||||
$this->const[$r][3] = "";
|
||||
$this->const[$r][4] = 0;
|
||||
$r++;
|
||||
|
||||
$this->const[$r][0] = "MAIN_SUBMODULE_EXPEDITION";
|
||||
$this->const[$r][1] = "chaine";
|
||||
$this->const[$r][2] = "1";
|
||||
$this->const[$r][3] = "Enable delivery receipts";
|
||||
$this->const[$r][4] = 0;
|
||||
$r++;
|
||||
|
||||
$this->const = [
|
||||
[
|
||||
"EXPEDITION_ADDON_PDF",
|
||||
"chaine",
|
||||
"espadon",
|
||||
'Nom du gestionnaire de generation des bons expeditions en PDF',
|
||||
0,
|
||||
],
|
||||
[
|
||||
"EXPEDITION_ADDON_NUMBER",
|
||||
"chaine",
|
||||
"mod_expedition_safor",
|
||||
'Name for numbering manager for shipments',
|
||||
0,
|
||||
],
|
||||
[
|
||||
"EXPEDITION_ADDON_PDF_ODT_PATH",
|
||||
"chaine",
|
||||
"DOL_DATA_ROOT/doctemplates/shipments",
|
||||
"",
|
||||
0,
|
||||
],
|
||||
[
|
||||
"DELIVERY_ADDON_PDF",
|
||||
"chaine",
|
||||
"storm",
|
||||
'Nom du gestionnaire de generation des bons de reception en PDF',
|
||||
0,
|
||||
],
|
||||
[
|
||||
"DELIVERY_ADDON_NUMBER",
|
||||
"chaine",
|
||||
"mod_delivery_jade",
|
||||
'Nom du gestionnaire de numerotation des bons de reception',
|
||||
0,
|
||||
],
|
||||
[
|
||||
"DELIVERY_ADDON_PDF_ODT_PATH",
|
||||
"chaine",
|
||||
"DOL_DATA_ROOT/doctemplates/deliveries",
|
||||
"",
|
||||
0,
|
||||
],
|
||||
[
|
||||
"MAIN_SUBMODULE_EXPEDITION",
|
||||
"chaine",
|
||||
"1",
|
||||
"Enable delivery receipts",
|
||||
0,
|
||||
],
|
||||
];
|
||||
// Boxes
|
||||
$this->boxes = array(
|
||||
0=>array('file'=>'box_shipments.php', 'enabledbydefaulton'=>'Home'),
|
||||
0 => array('file'=>'box_shipments.php', 'enabledbydefaulton'=>'Home'),
|
||||
);
|
||||
|
||||
// Permissions
|
||||
$this->rights = array();
|
||||
$this->rights_class = 'expedition';
|
||||
$this->rights = array();
|
||||
$r = 0;
|
||||
|
||||
$r++;
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
* Copyright (C) 2021-2023 Waël Almoman <info@almoman.com>
|
||||
* Copyright (C) 2021 Maxime Demarest <maxime@indelog.fr>
|
||||
* Copyright (C) 2021 Dorian Vabre <dorian.vabre@gmail.com>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024-2025 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
|
||||
|
|
@ -174,6 +174,7 @@ $error = 0;
|
|||
|
||||
// Check if we have redirtodomain to do.
|
||||
$ws_virtuelhost = null;
|
||||
$doactionsthenredirect = 0;
|
||||
if ($ws) {
|
||||
$doactionsthenredirect = 1;
|
||||
include_once DOL_DOCUMENT_ROOT.'/website/class/website.class.php';
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user