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

phpolar / storage-driver / 14049249173

25 Mar 2025 01:02AM UTC coverage: 100.0%. First build
14049249173

Pull #28

github

web-flow
Merge 1a0944e7d into 35b419648
Pull Request #28: build(deps-dev): bump phpunit/phpunit from 12.0.9 to 12.0.10

11 of 11 relevant lines covered (100.0%)

7.36 hits per line

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

100.0
/src/Functions/parseTypeName.php
1
<?php
2

3
declare(strict_types=1);
4

5
use Phpolar\StorageDriver\TypeName;
6

7
/**
8
 * Convert a string into a TypeName
9
 */
10
function parseTypeName(string $str): TypeName
11
{
12
    return match ($str) {
17✔
13
        "string" => TypeName::T_String,
1✔
14
        "int", "integer" => TypeName::T_Int,
2✔
15
        "double", "float" => TypeName::T_Float,
2✔
16
        "bool", "boolean" => TypeName::T_Bool,
2✔
17
        "null", "NULL" => TypeName::T_Null,
2✔
18
        "resource" => TypeName::T_Resource,
1✔
19
        DateTimeInterface::class, DateTime::class, DateTimeImmutable::class =>
17✔
20
        TypeName::T_DateTime,
3✔
21
        default => TypeName::Invalid,
17✔
22
    };
17✔
23
}
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