• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

valksor / php-doctrine-tools / 21323315897

28 Dec 2025 12:41AM UTC coverage: 6.965% (-16.9%) from 23.881%
21323315897

push

github

k0d3r1s
funding coffee

14 of 201 relevant lines covered (6.97%)

0.15 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/Doctrine/DBAL/Type/UTCDateImmutableType.php
1
<?php declare(strict_types = 1);
2

3
/*
4
 * This file is part of the Valksor package.
5
 *
6
 * (c) Davis Zalitis (k0d3r1s)
7
 * (c) SIA Valksor <packages@valksor.com>
8
 *
9
 * For the full copyright and license information, please view the LICENSE
10
 * file that was distributed with this source code.
11
 */
12

13
namespace Valksor\Component\DoctrineTools\Doctrine\DBAL\Type;
14

15
use DateTimeImmutable;
16
use Doctrine\DBAL\Platforms\AbstractPlatform;
17
use Doctrine\DBAL\Types\ConversionException;
18
use Doctrine\DBAL\Types\DateImmutableType;
19
use Valksor\Component\DoctrineTools\Doctrine\DBAL\Traits;
20
use Valksor\Component\DoctrineTools\UTCDateTimeImmutable;
21

22
class UTCDateImmutableType extends DateImmutableType
23
{
24
    use Traits\_ConvertToDatabaseValue;
25
    use Traits\_ConvertToPHPValue;
26

27
    /**
28
     * @throws ConversionException
29
     */
30
    public function convertToPHPValue(
31
        $value,
32
        AbstractPlatform $platform,
33
    ): ?DateTimeImmutable {
34
        return $this->convertToPHPValueForType(value: $value, platform: $platform, object: new UTCDateTimeImmutable(), function: 'date_create_immutable', prefix: '!');
×
35
    }
36
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc