Skip to content

Commit 14c6386

Browse files
authored
Merge pull request #15 from JackWH/master
Fixed a bug where output classes could be incorrectly instantiated by the framework
2 parents b2b58c3 + a369f78 commit 14c6386

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/QueryDetector.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -172,14 +172,14 @@ public function getDetectedQueries(): Collection
172172

173173
protected function applyOutput(Response $response)
174174
{
175-
$outputTypes = app(config('querydetector.output'));
175+
$outputTypes = config('querydetector.output');
176176

177177
if (! is_array($outputTypes)) {
178-
$types = [$outputTypes];
178+
$outputTypes = [$outputTypes];
179179
}
180180

181181
foreach ($outputTypes as $type) {
182-
$type->output($this->getDetectedQueries(), $response);
182+
app($type)->output($this->getDetectedQueries(), $response);
183183
}
184184
}
185185

0 commit comments

Comments
 (0)