Skip to content

Commit 167e2aa

Browse files
committed
chore: rector
1 parent b2aa1a6 commit 167e2aa

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/QueryDataTable.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,7 @@ public function columnControlSearch(): void
377377
if ($type === 'date') {
378378
try {
379379
$value = $mask ? Carbon::createFromFormat($mask, $value) : Carbon::parse($value);
380-
} catch (\Exception $e) {
380+
} catch (\Exception) {
381381
// can't parse date
382382
}
383383

@@ -637,11 +637,11 @@ protected function getSelectedColumns($query): array
637637
];
638638

639639
foreach ($q->columns ?? [] as $select) {
640-
$sql = trim($select instanceof Expression ? $select->getValue($this->getConnection()->getQueryGrammar()) : $select);
640+
$sql = trim((string) $select instanceof Expression ? $select->getValue($this->getConnection()->getQueryGrammar()) : $select);
641641
// Remove expressions
642642
$sql = preg_replace('/\s*\w*\((?:[^()]*|(?R))*\)/', '_', $sql);
643643
// Remove multiple spaces
644-
$sql = preg_replace('/\s+/', ' ', $sql);
644+
$sql = preg_replace('/\s+/', ' ', (string) $sql);
645645
// Remove wrappers
646646
$sql = str_replace(['`', '"', '[', ']'], '', $sql);
647647
// Loop on select columns

0 commit comments

Comments
 (0)