1
0
mirror of https://github.com/dg/dibi.git synced 2025-09-09 05:40:50 +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

@@ -13,13 +13,16 @@ switch ($config['system']) {
case 'mysql':
Assert::equal('10:20:30.0', $translator->formatValue(new DateInterval('PT10H20M30S'), null));
Assert::equal('-1:00:00.0', $translator->formatValue(DateInterval::createFromDateString('-1 hour'), null));
Assert::exception(function () use ($translator) {
$translator->formatValue(new DateInterval('P2Y4DT6H8M'), null);
}, Dibi\NotSupportedException::class, 'Only time interval is supported.');
Assert::exception(
fn() => $translator->formatValue(new DateInterval('P2Y4DT6H8M'), null),
Dibi\NotSupportedException::class,
'Only time interval is supported.',
);
break;
default:
Assert::exception(function () use ($translator) {
$translator->formatValue(new DateInterval('PT10H20M30S'), null);
}, Dibi\Exception::class);
Assert::exception(
fn() => $translator->formatValue(new DateInterval('PT10H20M30S'), null),
Dibi\Exception::class,
);
}