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

jojo1981 / decoder-aggregate / 12712243989

10 Jan 2025 03:19PM UTC coverage: 100.0%. Remained the same
12712243989

push

github

jojo1981
Use GitHub actions workflow for CI instead of Travis CI.

112 of 112 relevant lines covered (100.0%)

4.81 hits per line

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

100.0
/src/Exception/EncodeDecoderRegistryException.php
1
<?php declare(strict_types=1);
2
/*
3
 * This file is part of the jojo1981/decoder-aggregate package
4
 *
5
 * Copyright (c) 2021 Joost Nijhuis <jnijhuis81@gmail.com>
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed in the root of the source code
9
 */
10
namespace Jojo1981\DecoderAggregate\Exception;
11

12
use DomainException;
13
use function sprintf;
14

15
/**
16
 * @package Jojo1981\DecoderAggregate\Exception
17
 */
18
final class EncodeDecoderRegistryException extends DomainException
19
{
20
    /**
21
     * @param string $format
22
     * @return EncodeDecoderRegistryException
23
     */
24
    public static function encoderForFormatAlreadyExists(string $format): EncodeDecoderRegistryException
25
    {
26
        return new self(sprintf('There is already a encoder register for format: `%s`.', $format));
1✔
27
    }
28

29
    /**
30
     * @param string $format
31
     * @return EncodeDecoderRegistryException
32
     */
33
    public static function decoderForFormatAlreadyExists(string $format): EncodeDecoderRegistryException
34
    {
35
        return new self(sprintf('There is already a decoder register for format: `%s`.', $format));
1✔
36
    }
37

38
    /**
39
     * @param string $format
40
     * @return EncodeDecoderRegistryException
41
     */
42
    public static function encoderForFormatDoesNotExists(string $format): EncodeDecoderRegistryException
43
    {
44
        return new self(sprintf('There is no encoder registered for format: `%s`.', $format));
2✔
45
    }
46

47
    /**
48
     * @param string $format
49
     * @return EncodeDecoderRegistryException
50
     */
51
    public static function decoderForFormatDoesNotExists(string $format): EncodeDecoderRegistryException
52
    {
53
        return new self(sprintf('There is no decoder registered for format: `%s`.', $format));
2✔
54
    }
55
}
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

© 2025 Coveralls, Inc