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

DoclerLabs / api-client-generator / 21433000758

28 Jan 2026 09:39AM UTC coverage: 86.69% (-0.3%) from 86.973%
21433000758

Pull #131

github

web-flow
Bump phpunit/phpunit from 9.5.9 to 9.6.33

Bumps [phpunit/phpunit](https://github.com/sebastianbergmann/phpunit) from 9.5.9 to 9.6.33.
- [Release notes](https://github.com/sebastianbergmann/phpunit/releases)
- [Changelog](https://github.com/sebastianbergmann/phpunit/blob/9.6.33/ChangeLog-9.6.md)
- [Commits](https://github.com/sebastianbergmann/phpunit/compare/9.5.9...9.6.33)

---
updated-dependencies:
- dependency-name: phpunit/phpunit
  dependency-version: 9.6.33
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
Pull Request #131: Bump phpunit/phpunit from 9.5.9 to 9.6.33

3465 of 3997 relevant lines covered (86.69%)

7.11 hits per line

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

33.33
/src/Entity/Request.php
1
<?php
2

3
declare(strict_types=1);
4

5
namespace DoclerLabs\ApiClientGenerator\Entity;
6

7
use DoclerLabs\ApiClientGenerator\Input\InvalidSpecificationException;
8
use DoclerLabs\ApiClientGenerator\Output\Copy\Serializer\ContentType\FormUrlencodedContentTypeSerializer;
9
use DoclerLabs\ApiClientGenerator\Output\Copy\Serializer\ContentType\JsonContentTypeSerializer;
10
use DoclerLabs\ApiClientGenerator\Output\Copy\Serializer\ContentType\VdnApiJsonContentTypeSerializer;
11
use DoclerLabs\ApiClientGenerator\Output\Copy\Serializer\ContentType\XmlContentTypeSerializer;
12

13
class Request
14
{
15
    public const GET = 'GET';
16

17
    public const POST = 'POST';
18

19
    public const PUT = 'PUT';
20

21
    public const PATCH = 'PATCH';
22

23
    public const OPTIONS = 'OPTIONS';
24

25
    public const DELETE = 'DELETE';
26

27
    public const HEAD = 'HEAD';
28

29
    public const ALLOWED_METHODS = [
30
        self::GET,
31
        self::POST,
32
        self::PUT,
33
        self::PATCH,
34
        self::OPTIONS,
35
        self::DELETE,
36
        self::HEAD,
37
    ];
38

39
    private const ALLOWED_CONTENT_TYPES = [
40
        JsonContentTypeSerializer::MIME_TYPE,
41
        FormUrlencodedContentTypeSerializer::MIME_TYPE,
42
        XmlContentTypeSerializer::MIME_TYPE,
43
        VdnApiJsonContentTypeSerializer::MIME_TYPE,
44
    ];
45

46
    public function __construct(
47
        public readonly string $path,
48
        public readonly string $method,
49
        public readonly RequestFieldRegistry $fields,
50
        public readonly array $bodyContentTypes
51
    ) {
52
        if (!in_array($method, self::ALLOWED_METHODS, true)) {
3✔
53
            throw new InvalidSpecificationException(
×
54
                sprintf('Unsupported request method `%s` in `%s`.', $method, $path)
×
55
            );
×
56
        }
57

58
        $unsupportedContentTypes = array_diff($bodyContentTypes, Request::ALLOWED_CONTENT_TYPES);
3✔
59
        if (!empty($unsupportedContentTypes)) {
3✔
60
            throw new InvalidSpecificationException(
×
61
                sprintf('Request content-type %s is not currently supported.', json_encode($unsupportedContentTypes))
×
62
            );
×
63
        }
64
    }
65
}
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