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

majermi4 / FriendlyConfig / 10884159243

16 Sep 2024 12:49PM UTC coverage: 94.231% (+0.8%) from 93.392%
10884159243

push

github

Michal Majer
Apply code style rules.

1 of 2 new or added lines in 2 files covered. (50.0%)

245 of 260 relevant lines covered (94.23%)

25.83 hits per line

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

83.33
/src/Majermi4/FriendlyConfig/PhpDocParser/ArrayItemType.php
1
<?php
2

3
declare(strict_types=1);
4

5
namespace Majermi4\FriendlyConfig\PhpDocParser;
6

7
/**
8
 * Used to communicate array key/item type information.
9
 */
10
class ArrayItemType
11
{
12
    private string $keyType;
13
    private string $valueType;
14

15
    public function __construct(string $keyType, string $valueType)
16
    {
17
        if (!in_array($keyType, ['string', 'int'])) {
36✔
NEW
18
            throw new \RuntimeException('$keyType must be either string or int. "'.$keyType.'" given.');
×
19
        }
20

21
        $this->keyType = $keyType;
36✔
22
        $this->valueType = $valueType;
36✔
23
    }
24

25
    public function getKeyType(): string
26
    {
27
        return $this->keyType;
34✔
28
    }
29

30
    public function getValueType(): string
31
    {
32
        return $this->valueType;
36✔
33
    }
34
}
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