mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-29 02:53:50 +00:00
DX: fix phpstan errors
This commit is contained in:
@@ -283,8 +283,7 @@ final class ImportPeopleFromCSVCommand extends Command
|
||||
$openingDateString = trim($row[array_search('opening_date', $headers, true)]);
|
||||
$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();
|
||||
$person = new Person();
|
||||
// add the center
|
||||
$center = $this->getCenter($row, $headers);
|
||||
|
||||
@@ -377,6 +376,7 @@ final class ImportPeopleFromCSVCommand extends Command
|
||||
$address->setPostcode($postalCode);
|
||||
|
||||
if (in_array('street1', $headers, true)) {
|
||||
/** @phpstan-ignore-next-line as this command is deprecated */
|
||||
$address->setStreetAddress1($street1Value);
|
||||
}
|
||||
$address->setValidFrom(new DateTime('today'));
|
||||
@@ -1024,7 +1024,6 @@ final class ImportPeopleFromCSVCommand extends Command
|
||||
|
||||
foreach ($possibleFormats as $format) {
|
||||
$this->logger->debug("Trying format {$format}", [__METHOD__]);
|
||||
/** @phpstan-ignore-next-line */
|
||||
$dateR = strptime($value, $format);
|
||||
|
||||
if (is_array($dateR) && '' === $dateR['unparsed']) {
|
||||
|
Reference in New Issue
Block a user