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

tarlepp / symfony-flex-backend / #5622

22 Feb 2025 10:59PM UTC coverage: 100.0%. Remained the same
#5622

Pull #2945

php-coveralls

web-flow
Merge ca05c026b into d9edad4e5
Pull Request #2945: Chore(ci) - GitHub actions image update

2299 of 2299 relevant lines covered (100.0%)

92.02 hits per line

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

100.0
/src/AutoMapper/ApiKey/RequestMapper.php
1
<?php
2
declare(strict_types = 1);
3
/**
4
 * /src/AutoMapper/ApiKey/RequestMapper.php
5
 *
6
 * @author TLe, Tarmo Leppänen <tarmo.leppanen@pinja.com>
7
 */
8

9
namespace App\AutoMapper\ApiKey;
10

11
use App\AutoMapper\RestRequestMapper;
12
use App\Entity\UserGroup;
13
use App\Resource\UserGroupResource;
14
use Throwable;
15
use function array_map;
16

17
/**
18
 * @package App\AutoMapper
19
 * @author TLe, Tarmo Leppänen <tarmo.leppanen@pinja.com>
20
 */
21
class RequestMapper extends RestRequestMapper
22
{
23
    /**
24
     * Properties to map to destination object.
25
     *
26
     * @var array<int, non-empty-string>
27
     */
28
    protected static array $properties = [
29
        'description',
30
        'userGroups',
31
    ];
32

33
    public function __construct(
34
        private readonly UserGroupResource $userGroupResource,
35
    ) {
36
    }
91✔
37

38
    /**
39
     * @param array<int, string> $userGroups
40
     *
41
     * @return array<int, UserGroup>
42
     *
43
     * @throws Throwable
44
     */
45
    protected function transformUserGroups(array $userGroups): array
46
    {
47
        return array_map(
4✔
48
            fn (string $userGroupUuid): UserGroup => $this->userGroupResource->getReference($userGroupUuid),
4✔
49
            $userGroups,
4✔
50
        );
4✔
51
    }
52
}
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