Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Roman Pištěk <roman.pistek@keboola.com>
  • Loading branch information
ondrajodas and romantmb authored Sep 4, 2024
1 parent 13657c0 commit 572c616
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/StorageModifier.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ public function createTable(array $tableInfo): void

private function createNonTypedTable(array $tableInfo): void
{
$headerFile = $this->tmp->createFile(sprintf('%s.header.csv', $tableInfo['id']));
$headerFile = new CsvFile($headerFile->getPathname());
$tempFile = $this->tmp->createFile(sprintf('%s.header.csv', $tableInfo['id']));
$headerFile = new CsvFile($tempFile->getPathname());
$headerFile->writeRow($tableInfo['columns']);

$this->client->createTableAsync(
Expand All @@ -64,7 +64,7 @@ private function createTypedTable(array $tableInfo): void
$columns[$column] = [];
}
foreach ($tableInfo['columnMetadata'] ?? [] as $columnName => $column) {
$columnName = strval($columnName);
$columnName = (string) $columnName;
$columnMetadata = [];
foreach ($column as $metadata) {
if ($metadata['provider'] !== 'storage') {
Expand Down

0 comments on commit 572c616

Please sign in to comment.