fix: SA: Fix "...invoked with..." rule.

SA stands for Static Analysis.
This commit is contained in:
Pol Dellaiera
2021-11-16 12:16:02 +01:00
parent a3eb23478a
commit c68bda5c9b
11 changed files with 183 additions and 355 deletions

View File

@@ -494,6 +494,7 @@ EOF
$openingDateString = trim($row[array_search('opening_date', $headers)]);
$openingDate = $this->processDate($openingDateString, $this->input->getOption('opening_date_format'));
// @TODO: Fix the constructor parameter, $openingDate does not exists.
$person = $openingDate instanceof \DateTime ? new Person($openingDate) : new Person();
// add the center
$center = $this->getCenter($row, $headers);