forked from Wavyzz/dolibarr
Qual: Fix phan/phpstan notices (#31297)
# Qual: Fix phan/phpstan notices Fix several phan and phpstan notices.
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
* Copyright (c) 2005-2013 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* 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
|
||||
@@ -34,9 +35,18 @@ include_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
||||
*/
|
||||
class ReceptionStats extends Stats
|
||||
{
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $table_element;
|
||||
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
public $socid;
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
public $userid;
|
||||
|
||||
public $from;
|
||||
@@ -84,9 +94,9 @@ class ReceptionStats extends Stats
|
||||
/**
|
||||
* Return reception number by month for a year
|
||||
*
|
||||
* @param int $year Year to scan
|
||||
* @param int $format 0=Label of abscissa is a translated text, 1=Label of abscissa is month number, 2=Label of abscissa is first letter of month
|
||||
* @return array Array with number by month
|
||||
* @param int $year Year to scan
|
||||
* @param int<0,2> $format 0=Label of abscissa is a translated text, 1=Label of abscissa is month number, 2=Label of abscissa is first letter of month
|
||||
* @return array<int<0,11>,array{0:int<1,12>,1:int}> Array with number by month
|
||||
*/
|
||||
public function getNbByMonth($year, $format = 0)
|
||||
{
|
||||
@@ -109,7 +119,7 @@ class ReceptionStats extends Stats
|
||||
/**
|
||||
* Return receptions number per year
|
||||
*
|
||||
* @return array Array with number by year
|
||||
* @return array<array{0:int,1:int}> Array with number by year
|
||||
*
|
||||
*/
|
||||
public function getNbByYear()
|
||||
@@ -132,8 +142,8 @@ class ReceptionStats extends Stats
|
||||
* Return the orders amount by month for a year
|
||||
*
|
||||
* @param int $year Year to scan
|
||||
* @param int $format 0=Label of abscissa is a translated text, 1=Label of abscissa is month number, 2=Label of abscissa is first letter of month
|
||||
* @return array Array with amount by month
|
||||
* @param int<0,2> $format 0=Label of abscissa is a translated text, 1=Label of abscissa is month number, 2=Label of abscissa is first letter of month
|
||||
* @return array<int<0,11>,array{0:int<1,12>,1:int|float}> Array with amount by month
|
||||
*/
|
||||
public function getAmountByMonth($year, $format = 0)
|
||||
{
|
||||
@@ -157,7 +167,7 @@ class ReceptionStats extends Stats
|
||||
* Return the orders amount average by month for a year
|
||||
*
|
||||
* @param int $year year for stats
|
||||
* @return array array with number by month
|
||||
* @return array<int<0,11>,array{0:int<1,12>,1:int|float}> Array of average each month array with number by month
|
||||
*/
|
||||
public function getAverageByMonth($year)
|
||||
{
|
||||
@@ -179,7 +189,7 @@ class ReceptionStats extends Stats
|
||||
/**
|
||||
* Return nb, total and average
|
||||
*
|
||||
* @return array Array of values
|
||||
* @return array<array{year:string,nb:string,nb_diff:float,total_diff:float,avg_diff:float,avg_weighted:float}> Array with nb, total amount, average for each year
|
||||
*/
|
||||
public function getAllByYear()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user