mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-01-07 09:32:47 +01:00
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) 2014 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024 Christophe Battarel <christophe@altairis.fr>
|
||||
* 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
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
@@ -100,11 +101,29 @@ class ReceptionLineBatch extends CommonObjectLine
|
||||
*/
|
||||
public $qty_asked;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $libelle;
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $label;
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $desc;
|
||||
/**
|
||||
* @var float
|
||||
*/
|
||||
public $tva_tx;
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $vat_src_code;
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $ref_supplier;
|
||||
|
||||
/**
|
||||
@@ -117,7 +136,13 @@ class ReceptionLineBatch extends CommonObjectLine
|
||||
*/
|
||||
public $fk_user;
|
||||
|
||||
/**
|
||||
* @var int|string
|
||||
*/
|
||||
public $datec = '';
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $comment;
|
||||
|
||||
/**
|
||||
@@ -125,9 +150,21 @@ class ReceptionLineBatch extends CommonObjectLine
|
||||
*/
|
||||
public $status;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $batch;
|
||||
public $eatby = '';
|
||||
public $sellby = '';
|
||||
/**
|
||||
* @var ?int
|
||||
*/
|
||||
public $eatby = null;
|
||||
/**
|
||||
* @var ?int
|
||||
*/
|
||||
public $sellby = null;
|
||||
/**
|
||||
* @var int|float
|
||||
*/
|
||||
public $cost_price = 0;
|
||||
|
||||
|
||||
@@ -234,8 +271,8 @@ class ReceptionLineBatch extends CommonObjectLine
|
||||
$sql .= " ".(!isset($this->comment) ? 'NULL' : "'".$this->db->escape($this->comment)."'").",";
|
||||
$sql .= " ".(!isset($this->status) ? 'NULL' : (int) $this->status).",";
|
||||
$sql .= " ".(!isset($this->batch) ? 'NULL' : "'".$this->db->escape($this->batch)."'").",";
|
||||
$sql .= " ".(!isset($this->eatby) || dol_strlen($this->eatby) == 0 ? 'NULL' : "'".$this->db->idate($this->eatby)."'").",";
|
||||
$sql .= " ".(!isset($this->sellby) || dol_strlen($this->sellby) == 0 ? 'NULL' : "'".$this->db->idate($this->sellby)."'").",";
|
||||
$sql .= " ".(!isset($this->eatby) || dol_strlen((string) $this->eatby) == 0 ? 'NULL' : "'".$this->db->idate($this->eatby)."'").",";
|
||||
$sql .= " ".(!isset($this->sellby) || dol_strlen((string) $this->sellby) == 0 ? 'NULL' : "'".$this->db->idate($this->sellby)."'").",";
|
||||
$sql .= " ".((int) $this->fk_reception).",";
|
||||
$sql .= " ".(!isset($this->cost_price) ? '0' : (float) $this->cost_price);
|
||||
$sql .= ")";
|
||||
@@ -417,8 +454,8 @@ class ReceptionLineBatch extends CommonObjectLine
|
||||
$sql .= " status=".(isset($this->status) ? $this->status : "null").",";
|
||||
$sql .= " tms=".(dol_strlen((string) $this->tms) != 0 ? "'".$this->db->idate($this->tms)."'" : 'null').",";
|
||||
$sql .= " batch=".(isset($this->batch) ? "'".$this->db->escape($this->batch)."'" : "null").",";
|
||||
$sql .= " eatby=".(dol_strlen($this->eatby) != 0 ? "'".$this->db->idate($this->eatby)."'" : 'null').",";
|
||||
$sql .= " sellby=".(dol_strlen($this->sellby) != 0 ? "'".$this->db->idate($this->sellby)."'" : 'null');
|
||||
$sql .= " eatby=".(dol_strlen((string) $this->eatby) != 0 ? "'".$this->db->idate($this->eatby)."'" : 'null').",";
|
||||
$sql .= " sellby=".(dol_strlen((string) $this->sellby) != 0 ? "'".$this->db->idate($this->sellby)."'" : 'null');
|
||||
$sql .= " WHERE rowid=".((int) $this->id);
|
||||
|
||||
$this->db->begin();
|
||||
@@ -655,8 +692,8 @@ class ReceptionLineBatch extends CommonObjectLine
|
||||
$this->status = 0;
|
||||
$this->tms = dol_now();
|
||||
$this->batch = '';
|
||||
$this->eatby = '';
|
||||
$this->sellby = '';
|
||||
$this->eatby = null;
|
||||
$this->sellby = null;
|
||||
|
||||
return 1;
|
||||
}
|
||||
@@ -668,7 +705,7 @@ class ReceptionLineBatch extends CommonObjectLine
|
||||
* @param string $sortfield Sort field
|
||||
* @param int $limit limit
|
||||
* @param int $offset offset limit
|
||||
* @param string|array $filter filter array
|
||||
* @param string|array<string,mixed> $filter filter array
|
||||
* @param string $filtermode filter mode (AND or OR)
|
||||
* @return int Return integer <0 if KO, >0 if OK
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user