Skip to content
This repository has been archived by the owner on Aug 16, 2024. It is now read-only.

Commit

Permalink
fix: remove array walk (#213)
Browse files Browse the repository at this point in the history
* fix: remove array walk

* fix: removed test
  • Loading branch information
gabrielg2020 authored Aug 13, 2024
1 parent 1ebbded commit 5980240
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,7 @@ public function handleQuery(QueryInterface $query)
'licence' => $application->getLicence()->getId(),
'statuses' => $query->getStatuses(),
];
$byLicence = $this->getQueryHandler()->handleQuery(GetConversationsByLicenceQuery::create($licenceQuery));
array_walk(
$byLicence['result'],
fn(&$result) => $result['task']['application'] = $application->serialize(),
);

return $byLicence;
return $this->getQueryHandler()->handleQuery(GetConversationsByLicenceQuery::create($licenceQuery));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ public function testHandleQuery()
$mockLicence->shouldReceive('getId')->once()->andReturn(2);
$mockApplication = m::mock(Application::class);
$mockApplication->shouldReceive('getLicence')->once()->andReturn($mockLicence);
$mockApplication->shouldReceive('serialize')->once()->andReturn(['id' => 7]);

$this->repoMap[Repository\Application::class]->shouldReceive('fetchById')->andReturn($mockApplication);

Expand Down

0 comments on commit 5980240

Please sign in to comment.