fix phpstan is incompatible with

This commit is contained in:
Frédéric France 2024-03-14 20:37:21 +01:00
parent f36cd6a281
commit 75e693b9b9
6 changed files with 22 additions and 20 deletions

View file

@ -4,7 +4,7 @@
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
* Copyright (C) 2016 Charlie Benke <charlie@patas-monkey.com>
* Copyright (C) 2018-2021 Philippe Grand <philippe.grand@atoo-net.com>
* Copyright (C) 2018-2022 Frédéric France <frederic.france@netlogic.fr>
* Copyright (C) 2018-2024 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
@ -212,7 +212,7 @@ class doc_generic_recruitmentjobposition_odt extends ModelePDFRecruitmentJobPosi
/**
* Function to build a document on disk using the generic odt module.
*
* @param Commande $object Object source to build document
* @param RecruitmentJobPosition $object Object source to build document
* @param Translate $outputlangs Lang output object
* @param string $srctemplatepath Full path of source filename for generator using a template file
* @param int $hidedetails Do not show line details

View file

@ -8,7 +8,7 @@
* Copyright (C) 2012-2014 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
* Copyright (C) 2017 Ferran Marcet <fmarcet@2byte.es>
* Copyright (C) 2018-2021 Frédéric France <frederic.france@netlogic.fr>
* Copyright (C) 2018-2024 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
@ -177,7 +177,7 @@ class pdf_standard_recruitmentjobposition extends ModelePDFRecruitmentJobPositio
/**
* Function to build pdf onto disk
*
* @param Object $object Object to generate
* @param RecruitmentJobPosition $object RecruitmentJobPosition to generate
* @param Translate $outputlangs Lang output object
* @param string $srctemplatepath Full path of source filename for generator using a template file
* @param int $hidedetails Do not show line details
@ -807,7 +807,7 @@ class pdf_standard_recruitmentjobposition extends ModelePDFRecruitmentJobPositio
* Show top header of page.
*
* @param TCPDF $pdf Object PDF
* @param Object $object Object to show
* @param RecruitmentJobPosition $object Object to show
* @param int $showaddress 0=no, 1=yes
* @param Translate $outputlangs Object lang for output
* @param Translate $outputlangsbis Object lang for output bis
@ -1053,7 +1053,7 @@ class pdf_standard_recruitmentjobposition extends ModelePDFRecruitmentJobPositio
* Show footer of page. Need this->emetteur object
*
* @param TCPDF $pdf PDF
* @param Object $object Object to show
* @param RecruitmentJobPosition $object Object to show
* @param Translate $outputlangs Object lang for output
* @param int $hidefreetext 1=Hide free text
* @return int Return height of bottom margin including footer text

View file

@ -3,7 +3,7 @@
* Copyright (C) 2004-2007 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2008 Raphael Bertrand (Resultic) <raphael.bertrand@resultic.fr>
* Copyright (C) 2019 Frédéric France <frederic.france@netlogic.fr>
* Copyright (C) 2019-2024 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
@ -118,7 +118,7 @@ class mod_recruitmentcandidature_advanced extends ModeleNumRefRecruitmentCandida
/**
* Return next free value
*
* @param Object $object Object we need next value for
* @param RecruitmentCandidature $object Object we need next value for
* @return string|0 Next value if OK, 0 if KO
*/
public function getNextValue($object)
@ -135,7 +135,7 @@ class mod_recruitmentcandidature_advanced extends ModeleNumRefRecruitmentCandida
return 0;
}
$date = $object->date;
$date = $object->date ?? '';
$numFinal = get_next_value($db, $mask, 'recruitment_recruitmentcandidature', 'ref', '', null, $date);

View file

@ -1,6 +1,7 @@
<?php
/* Copyright (C) 2005-2010 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2024 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
@ -76,8 +77,8 @@ class mod_recruitmentcandidature_standard extends ModeleNumRefRecruitmentCandida
* Checks if the numbers already in the database do not
* cause conflicts that would prevent this numbering working.
*
* @param Object $object Object we need next value for
* @return boolean false if conflict, true if ok
* @param RecruitmentCandidature $object Object we need next value for
* @return boolean false if conflict, true if ok
*/
public function canBeActivated($object)
{
@ -116,8 +117,8 @@ class mod_recruitmentcandidature_standard extends ModeleNumRefRecruitmentCandida
/**
* Return next free value
*
* @param Object $object Object we need next value for
* @return string|-1 Next value if OK, -1 if KO
* @param RecruitmentCandidature $object Object we need next value for
* @return string|-1 Next value if OK, -1 if KO
*/
public function getNextValue($object)
{

View file

@ -3,7 +3,7 @@
* Copyright (C) 2004-2007 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2008 Raphael Bertrand (Resultic) <raphael.bertrand@resultic.fr>
* Copyright (C) 2019 Frédéric France <frederic.france@netlogic.fr>
* Copyright (C) 2019-2024 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
@ -118,8 +118,8 @@ class mod_recruitmentjobposition_advanced extends ModeleNumRefRecruitmentJobPosi
/**
* Return next free value
*
* @param Object $object Object we need next value for
* @return string|0 Next value if OK, 0 if KO
* @param RecruitmentJobPosition $object Object we need next value for
* @return string|0 Next value if OK, 0 if KO
*/
public function getNextValue($object)
{
@ -135,7 +135,7 @@ class mod_recruitmentjobposition_advanced extends ModeleNumRefRecruitmentJobPosi
return 0;
}
$date = $object->date;
$date = $object->date ?? '';
$numFinal = get_next_value($db, $mask, 'recruitment_recruitmentjobposition', 'ref', '', null, $date);

View file

@ -1,6 +1,7 @@
<?php
/* Copyright (C) 2005-2010 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2024 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
@ -76,8 +77,8 @@ class mod_recruitmentjobposition_standard extends ModeleNumRefRecruitmentJobPosi
* Checks if the numbers already in the database do not
* cause conflicts that would prevent this numbering working.
*
* @param Object $object Object we need next value for
* @return boolean false if conflict, true if ok
* @param RecruitmentJobPosition $object Object we need next value for
* @return boolean false if conflict, true if ok
*/
public function canBeActivated($object)
{
@ -116,7 +117,7 @@ class mod_recruitmentjobposition_standard extends ModeleNumRefRecruitmentJobPosi
/**
* Return next free value
*
* @param Object $object Object we need next value for
* @param RecruitmentJobPosition $object Object we need next value for
* @return string|-1 Next value if OK, -1 if KO
*/
public function getNextValue($object)