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

IlyasDeckers / ody-core / 13532154862

25 Feb 2025 10:24PM UTC coverage: 30.374% (+1.7%) from 28.706%
13532154862

push

github

web-flow
Update php.yml

544 of 1791 relevant lines covered (30.37%)

9.13 hits per line

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

66.67
/src/Exception/HttpMethodNotAllowedException.php
1
<?php
2
declare(strict_types=1);
3

4
namespace Ody\Core\Exception;
5

6
use function implode;
7

8
class HttpMethodNotAllowedException extends HttpSpecializedException
9
{
10
    /**
11
     * @var string[]
12
     */
13
    protected array $allowedMethods = [];
14

15
    /**
16
     * @var int
17
     */
18
    protected $code = 405;
19

20
    /**
21
     * @var string
22
     */
23
    protected $message = 'Method not allowed.';
24

25
    protected string $title = '405 Method Not Allowed';
26
    protected string $description = 'The request method is not supported for the requested resource.';
27

28
    /**
29
     * @return string[]
30
     */
31
    public function getAllowedMethods(): array
×
32
    {
33
        return $this->allowedMethods;
×
34
    }
35

36
    /**
37
     * @param string[] $methods
38
     */
39
    public function setAllowedMethods(array $methods): self
1✔
40
    {
41
        $this->allowedMethods = $methods;
1✔
42
        $this->message = 'Method not allowed. Must be one of: ' . implode(', ', $methods);
1✔
43
        return $this;
1✔
44
    }
45
}
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