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

contributte / thepay-api / 4023857024

pending completion
4023857024

push

github

kodiakhq[bot]
Bump shivammathur/setup-php from 2.23.0 to 2.24.0

275 of 477 relevant lines covered (57.65%)

0.58 hits per line

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

36.36
/src/DataApi/Processors/DateTimeInflater.php
1
<?php declare(strict_types = 1);
2

3
namespace Tp\DataApi\Processors;
4

5
use DateTime;
6
use DateTimeImmutable;
7
use Tp\Exceptions\InvalidParameterException;
8

9
class DateTimeInflater extends ProcessorWithPaths
10
{
11

12
        protected function convertValue($value, array $itemPath)
13
        {
14
                $onPath = $this->onPath($itemPath);
1✔
15

16
                if (
17
                        $value !== null
1✔
18
                        && $onPath
1✔
19
                ) {
20
                        // Pozor, neprojde, pokud časové razítko obsahuje desetinnou část
21
                        // vteřin. Viz https://bugs.php.net/bug.php?id=51950.
22
                        $processed = DateTimeImmutable::createFromFormat(DateTime::ISO8601, $value);
×
23
                        if ($processed === false) {
×
24
                                $errorPathArray = $itemPath;
×
25
                                array_unshift($errorPathArray, '');
×
26
                                $errorPathString = implode('/', $errorPathArray);
×
27
                                throw new InvalidParameterException($errorPathString);
×
28
                        }
29

30
                        return $processed;
×
31
                }
32

33
                return $value;
1✔
34
        }
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