1
0
mirror of https://github.com/dg/dibi.git synced 2025-08-26 15:34:22 +02:00

coding style

This commit is contained in:
David Grudl
2021-03-01 17:55:56 +01:00
parent b6ead80202
commit d1a3362321
46 changed files with 592 additions and 496 deletions

View File

@@ -19,17 +19,22 @@ function buildPdoDriver(?int $errorMode)
// PDO error mode: exception
Assert::exception(function () {
buildPdoDriver(PDO::ERRMODE_EXCEPTION);
}, Dibi\DriverException::class, 'PDO connection in exception or warning error mode is not supported.');
Assert::exception(
fn() => buildPdoDriver(PDO::ERRMODE_EXCEPTION),
Dibi\DriverException::class,
'PDO connection in exception or warning error mode is not supported.',
);
// PDO error mode: warning
Assert::exception(function () {
buildPdoDriver(PDO::ERRMODE_WARNING);
}, Dibi\DriverException::class, 'PDO connection in exception or warning error mode is not supported.');
Assert::exception(
fn() => buildPdoDriver(PDO::ERRMODE_WARNING),
Dibi\DriverException::class,
'PDO connection in exception or warning error mode is not supported.',
);
test('PDO error mode: explicitly set silent', function () {
buildPdoDriver(PDO::ERRMODE_SILENT);
});
test(
'PDO error mode: explicitly set silent',
fn() => buildPdoDriver(PDO::ERRMODE_SILENT)
);