Skip to content

Commit

Permalink
qa: improve phpstan
Browse files Browse the repository at this point in the history
  • Loading branch information
g105b committed Jul 17, 2024
1 parent 76355b4 commit 3f26fc2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Query/SqlQuery.php
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ public function injectSpecialBindings(
continue;
}

$replacement = "";
if($type !== "string") {
$replacement = $this->escapeSpecialBinding(
$bindings[$special],
Expand Down Expand Up @@ -170,7 +171,7 @@ public function injectDynamicBindings(string $sql, array &$data):string {
return trim($sql);
}

/** @param array<string, string|array<string, string>> $data */
/** @param array<string, string|array<string, string|array<string>>> $data */
private function injectDynamicBindingsValueSet(string $sql, array &$data):string {
$pattern = '/\(\s*:__dynamicValueSet\s\)/';
if(!preg_match($pattern, $sql, $matches)) {
Expand Down Expand Up @@ -234,6 +235,7 @@ private function injectDynamicIn(string $sql, array &$data):string {
return str_replace($matches[0], "( $replacementString )", $sql);
}

/** @param array<string, string|array<string, array<string>>> $data */
private function injectDynamicOr(string $sql, array &$data):string {
$pattern = '/:__dynamicOr/';
if(!preg_match($pattern, $sql, $matches)) {
Expand Down

0 comments on commit 3f26fc2

Please sign in to comment.