Skip to content

Commit

Permalink
make nullable string for name colunm in exports
Browse files Browse the repository at this point in the history
  • Loading branch information
r0xsh committed Feb 12, 2025
1 parent 2b90e72 commit b38955f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Command/ExportOrdersCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ private function formatRow(array $row): array {
throw new \Exception('Invalid row, expected 28 columns');
}

$__s = fn (string $s): ?string => trim($s) ?: null;
$__s = fn (?string $s): ?string => trim($s) ?: null;
$__d = fn (string $d): ?\DateTimeInterface => \DateTimeImmutable::createFromFormat('Y-m-d H:i', $d) ?: null;
$__m = fn (string $m): int => intval(floatval(str_replace(',', '.', $m)) * 100);

Expand Down
2 changes: 1 addition & 1 deletion src/Command/ExportTasksCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ protected function exportData(\DateTimeInterface $start, \DateTimeInterface $end
*/
private function formatRow(array $row): array
{
$__s = fn (string $s): ?string => trim($s) ?: null;
$__s = fn (?string $s): ?string => trim($s) ?: null;
$__dt = fn (string $d, string $t): ?\DateTimeInterface => \DateTimeImmutable::createFromFormat('j/n/Y H:i:s', sprintf('%s %s', $d, $t)) ?: null;
$__m = fn (string $m): int => intval(floatval(str_replace(',', '.', $m)) * 100);

Expand Down

0 comments on commit b38955f

Please sign in to comment.