-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Qual: Fix phan/phpstan notices in class files (part 1) (#31501)
* Ignore phpstan configuration for spelling * Qual: Fix phan notices in class files
- Loading branch information
Showing
45 changed files
with
481 additions
and
226 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
<?php | ||
/* Copyright (C) 2021 Open-Dsi <[email protected]> | ||
* Copyright (C) 2024 MDW <[email protected]> | ||
* | ||
* 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 | ||
|
@@ -29,7 +30,7 @@ | |
class AssetAccountancyCodes extends CommonObject | ||
{ | ||
/** | ||
* @var array Array with all accountancy codes info by mode. | ||
* @var array<string,array<string,string|array<string,array{label:string,columnbreak?:bool}>>> Array with all accountancy codes info by mode. | ||
* Note : 'economic' mode is mandatory and is the primary accountancy codes | ||
* 'depreciation_asset' and 'depreciation_expense' is mandatory and is used for write depreciation in bookkeeping | ||
*/ | ||
|
@@ -64,7 +65,7 @@ class AssetAccountancyCodes extends CommonObject | |
); | ||
|
||
/** | ||
* @var array Array with all accountancy codes by mode. | ||
* @var array<string,array<string,string>> Array with all accountancy codes by mode. | ||
*/ | ||
public $accountancy_codes = array(); | ||
|
||
|
@@ -81,7 +82,7 @@ public function __construct(DoliDB $db) | |
/** | ||
* Fill accountancy_codes property of object (using for data sent by forms) | ||
* | ||
* @return array Array of values | ||
* @return array<string,array<string,string>> Array of values | ||
*/ | ||
public function setAccountancyCodesFromPost() | ||
{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
<?php | ||
/* Copyright (C) 2021 Open-Dsi <[email protected]> | ||
* Copyright (C) 2024 MDW <[email protected]> | ||
* | ||
* 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 | ||
|
@@ -77,7 +78,8 @@ | |
} | ||
} | ||
// Discard if extrafield is a hidden field on form | ||
if (abs($field_info['visible']) != 1 && abs($field_info['visible']) != 3 && abs($field_info['visible']) != 4 && abs($field_info['visible']) != 5) { | ||
$isVisibleAbs = array_key_exists('visible', $field_info) ? abs((int) $field_info['visible']) : 0; | ||
if (!in_array($isVisibleAbs, array(1, 3, 4, 5))) { | ||
continue; | ||
} | ||
if (array_key_exists('enabled', $field_info) && isset($field_info['enabled']) && !verifCond($field_info['enabled'])) { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
<?php | ||
/* Copyright (C) 2002-2003 Rodolphe Quiedeville <[email protected]> | ||
* Copyright (C) 2004-2014 Laurent Destailleur <[email protected]> | ||
* Copyright (C) 2024 MDW <[email protected]> | ||
* | ||
* 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 | ||
|
@@ -55,7 +56,7 @@ class CActionComm | |
|
||
/** | ||
* @var string label | ||
* @deprecated | ||
* @deprecated Use $label | ||
* @see $label | ||
*/ | ||
public $libelle; | ||
|
@@ -87,7 +88,7 @@ class CActionComm | |
|
||
|
||
/** | ||
* @var array Used to return value by some methods | ||
* @var array{id:array<int,string>,code:array<string,string>,all:array<string,array{id:string,label:string,type:string,color:mixed,picto:string}>} Used to return value by some methods | ||
*/ | ||
public $liste_array; | ||
|
||
|
@@ -148,13 +149,13 @@ public function fetch($id) | |
/** | ||
* Return list of event types: array(id=>label) or array(code=>label) | ||
* | ||
* @param string|int $active 1 or 0 to filter on event state active or not ('' by default = no filter) | ||
* @param string $idorcode 'id' or 'code' or 'all' | ||
* @param string $excludetype Type to exclude ('system' or 'systemauto') | ||
* @param int $onlyautoornot 1=Group all type AC_XXX into 1 line AC_MANUAL. 0=Keep details of type, -1 or -2=Keep details and add a combined line per calendar (Default, Auto, BoothConf, ...) | ||
* @param ''|int<0,1> $active 1 or 0 to filter on event state active or not ('' by default = no filter) | ||
* @param 'id'|'code'|'all' $idorcode 'id' or 'code' or 'all' | ||
* @param string $excludetype Type to exclude ('system' or 'systemauto') | ||
* @param int<-2,1> $onlyautoornot 1=Group all type AC_XXX into 1 line AC_MANUAL. 0=Keep details of type, -1 or -2=Keep details and add a combined line per calendar (Default, Auto, BoothConf, ...) | ||
* @param string $morefilter Add more SQL filter | ||
* @param int $shortlabel 1=Get short label instead of long label | ||
* @return array|int Array of all event types if OK, <0 if KO. Key of array is id or code depending on parameter $idorcode. | ||
* @param int<0,1> $shortlabel 1=Get short label instead of long label | ||
* @return int<-1,-1>|array{id:array<int,string>,code:array<string,string>,all:array<string,array{id:string,label:string,type:string,color:mixed,picto:string}>,AC_OTH_AUTO?:mixed} Array of all event types if OK, <0 if KO. Key of array is id or code depending on parameter $idorcode. | ||
*/ | ||
public function liste_array($active = '', $idorcode = 'id', $excludetype = '', $onlyautoornot = 0, $morefilter = '', $shortlabel = 0) | ||
{ | ||
|
Oops, something went wrong.