• 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/RestAutoMapperConfiguration.php
1
<?php
2
declare(strict_types = 1);
3
/**
4
 * /src/AutoMapper/RestAutoMapperConfiguration.php
5
 *
6
 * @author TLe, Tarmo Leppänen <tarmo.leppanen@pinja.com>
7
 */
8

9
namespace App\AutoMapper;
10

11
use AutoMapperPlus\AutoMapperPlusBundle\AutoMapperConfiguratorInterface;
12
use AutoMapperPlus\Configuration\AutoMapperConfigInterface;
13
use AutoMapperPlus\MapperInterface;
14
use Override;
15
use Symfony\Component\HttpFoundation\Request;
16

17
/**
18
 * @package App\AutoMapper
19
 * @author TLe, Tarmo Leppänen <tarmo.leppanen@pinja.com>
20
 */
21
abstract class RestAutoMapperConfiguration implements AutoMapperConfiguratorInterface
22
{
23
    /**
24
     * Classes to use specified request mapper.
25
     *
26
     * @var array<int, class-string>
27
     */
28
    protected static array $requestMapperClasses = [];
29

30
    public function __construct(
31
        protected readonly MapperInterface $requestMapper,
32
    ) {
33
    }
82✔
34

35
    /**
36
     * Use this method to register your mappings.
37
     *
38
     * @psalm-suppress UndefinedThisPropertyFetch
39
     */
40
    #[Override]
41
    public function configure(AutoMapperConfigInterface $config): void
42
    {
43
        foreach (static::$requestMapperClasses as $requestMapperClass) {
79✔
44
            $config
79✔
45
                ->registerMapping(Request::class, $requestMapperClass)
79✔
46
                ->useCustomMapper($this->requestMapper);
79✔
47
        }
48
    }
49
}
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