Skip to content

Commit 6fab13a

Browse files
committed
moved bindings function to a variable for readability
1 parent 80fd004 commit 6fab13a

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/Services/FileMakerConnection.php

+6-4
Original file line numberDiff line numberDiff line change
@@ -764,11 +764,13 @@ protected function logFMQuery($method, $url, $params, $start)
764764
$sql .= "\nData: " . json_encode($params, JSON_PRETTY_PRINT);
765765
}
766766

767+
$bindings = collect(data_get($params, 'query', []))->flatMap(
768+
fn (array $binding, $index) => collect($binding)->mapWithKeys(fn ($value, $key) => [$index . ': ' . $key => $value])
769+
)->all();
770+
767771
$this->event(new QueryExecuted(
768772
$sql,
769-
collect(data_get($params, 'query', []))->flatMap(
770-
fn (array $binding, $index) => collect($binding)->mapWithKeys(fn ($value, $key) => [$index.': '.$key => $value])
771-
)->all(),
773+
$bindings,
772774
$this->getElapsedTime($start),
773775
$this,
774776
));
@@ -816,7 +818,7 @@ public function setRetries($retries)
816818

817819
protected function getDefaultQueryGrammar()
818820
{
819-
return new FMGrammar();
821+
return new FMGrammar;
820822
}
821823

822824
// public function getLayoutMetadata($layout = null)

0 commit comments

Comments
 (0)