diff --git a/src/Client/PsrClickHouseClient.php b/src/Client/PsrClickHouseClient.php index bbc9ad4b..91364466 100644 --- a/src/Client/PsrClickHouseClient.php +++ b/src/Client/PsrClickHouseClient.php @@ -84,7 +84,7 @@ public function select( ): Output { try { return $this->selectWithParams($query, params: [], outputFormat: $outputFormat, settings: $settings); - } catch (UnsupportedParamValue | UnsupportedParamType) { + } catch (UnsupportedParamType | UnsupportedParamValue) { absurd(); } } @@ -124,7 +124,7 @@ public function selectStream( ): StreamInterface { try { return $this->selectStreamWithParams($query, params: [], outputFormat: $outputFormat, settings: $settings); - } catch (UnsupportedParamValue | UnsupportedParamType) { + } catch (UnsupportedParamType | UnsupportedParamValue) { absurd(); } } diff --git a/tests/Output/BasicTest.php b/tests/Output/BasicTest.php index fdab80dc..6c72afc3 100644 --- a/tests/Output/BasicTest.php +++ b/tests/Output/BasicTest.php @@ -17,6 +17,6 @@ public function testContentsAreSet(): void 1 TEXT; - self::assertSame($contents, (new Basic($contents))->contents); + self::assertSame($contents, new Basic($contents)->contents); } } diff --git a/tests/Sql/SqlFactoryTest.php b/tests/Sql/SqlFactoryTest.php index 52a484af..023a9c04 100644 --- a/tests/Sql/SqlFactoryTest.php +++ b/tests/Sql/SqlFactoryTest.php @@ -18,7 +18,7 @@ final class SqlFactoryTest extends TestCaseBase #[DataProvider('providerCreateWithParameters')] public function testCreateWithParameters(string $expectedSql, string $sqlWithPlaceholders, array $parameters): void { - $sql = (new SqlFactory(new ValueFormatter()))->createWithParameters($sqlWithPlaceholders, $parameters); + $sql = new SqlFactory(new ValueFormatter())->createWithParameters($sqlWithPlaceholders, $parameters); self::assertSame($expectedSql, $sql); } diff --git a/tests/Sql/ValueFormatterTest.php b/tests/Sql/ValueFormatterTest.php index a3dbe147..13f595b8 100644 --- a/tests/Sql/ValueFormatterTest.php +++ b/tests/Sql/ValueFormatterTest.php @@ -28,7 +28,7 @@ public function testFormat( ): void { self::assertSame( $expectedValue, - (new ValueFormatter())->format($value, $paramName, $sql), + new ValueFormatter()->format($value, $paramName, $sql), ); } @@ -117,7 +117,7 @@ public function __toString(): string #[DataProvider('providerMapFormat')] public function testMapFormat(array $expectedValues, array $values): void { - self::assertSame($expectedValues, (new ValueFormatter())->mapFormat($values)); + self::assertSame($expectedValues, new ValueFormatter()->mapFormat($values)); } /** @return iterable>> */ @@ -130,13 +130,13 @@ public function testUnsupportedTypeThrows(): void { $this->expectException(UnsupportedParamValue::class); - (new ValueFormatter())->format(new stdClass()); + new ValueFormatter()->format(new stdClass()); } public function testUnsupportedValueThrows(): void { $this->expectException(UnsupportedParamValue::class); - (new ValueFormatter())->format([], 'list', 'SELECT * FROM table WHERE a IN (:list)'); + new ValueFormatter()->format([], 'list', 'SELECT * FROM table WHERE a IN (:list)'); } }