Skip to content

Commit

Permalink
Fix Exporter for Doctrine 2.8+
Browse files Browse the repository at this point in the history
  • Loading branch information
MisatoTremor committed Jan 12, 2022
1 parent ae98d51 commit 392257b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions Export/Exporter.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@ public function getContent()

$content = null;
foreach ($iterableResults as $row) {
$row = reset($row);
if (null == $content) {
if (null === $content) {
$content = $this->arrayToCsv(array_keys($row));
}
$content .= $this->arrayToCsv(array_values($row));
Expand Down
2 changes: 1 addition & 1 deletion Tests/Export/Doctrine/ORM/ExporterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public function setUp(): void
$query = $this->getMockForAbstractClass(AbstractQuery::class, [], '', false, true, true, ['toIterable', 'HYDRATE_ARRAY', 'getSQL', '_doExecute']);
$query
->method('toIterable')
->willReturn([0 => [0 => ['row 1' => 'val\'1', 'row 2' => 'val,2', 'row 3' => 'val"3']]]);
->willReturn([0 => ['row 1' => 'val\'1', 'row 2' => 'val,2', 'row 3' => 'val"3']]);
$queryBuilder = $this->getMockBuilder(QueryBuilder::class)
->disableOriginalConstructor()
->setMethods(['select', 'from', 'getQuery'])
Expand Down

0 comments on commit 392257b

Please sign in to comment.