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

tylernathanreed / jira-client-php / 13634794100

03 Mar 2025 03:19PM UTC coverage: 2.067% (-0.1%) from 2.21%
13634794100

push

github

web-flow
~ Try coveralls action

140 of 6773 relevant lines covered (2.07%)

0.03 hits per line

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

72.73
/src/Dto.php
1
<?php
2

3
namespace Jira\Client;
4

5
use JsonSerializable;
6
use ReflectionClass;
7
use ReflectionProperty;
8

9
abstract readonly class Dto implements JsonSerializable
10
{
11
    /** @return array<string,mixed> */
12
    public function toArray(): array
1✔
13
    {
14
        $properties = [];
1✔
15

16
        foreach ((new ReflectionClass($this))->getProperties(ReflectionProperty::IS_PUBLIC) as $property) {
1✔
17
            $properties[$property->getName()] = $property->getValue($this);
1✔
18
        }
19

20
        return array_map(function ($value) {
1✔
21
            if ($value instanceof Dto) {
1✔
22
                return $value->toArray();
×
23
            }
24

25
            return $value;
1✔
26
        }, $properties);
1✔
27
    }
28

29
    /** @return array<string,mixed> */
30
    public function jsonSerialize(): array
×
31
    {
32
        return $this->toArray();
×
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