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

h4kuna / ares / 22293219950

22 Feb 2026 12:32PM UTC coverage: 84.701% (-4.8%) from 89.497%
22293219950

push

github

web-flow
Merge pull request #51 from h4kuna/php-coding-standard

Add coding standards

38 of 47 new or added lines in 16 files covered. (80.85%)

19 existing lines in 5 files now uncovered.

382 of 451 relevant lines covered (84.7%)

0.85 hits per line

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

0.0
/src/Exception/ServerResponseException.php
1
<?php declare(strict_types = 1);
2

3
namespace h4kuna\Ares\Exception;
4

5
use Throwable;
6

7
final class ServerResponseException extends RuntimeException
8
{
9

10
        /**
11
         * @param string $message
12
         */
13
        public function __construct(
14
                $message = 'The service is probably overloaded. Repeat request after a few minutes.',
15
                int $code = 0,
16
                ?Throwable $previous = null,
17
        )
18
        {
UNCOV
19
                $this->code = $code;
×
UNCOV
20
                parent::__construct($message, $previous);
×
21
        }
22

23
        public static function brokenXml(): self
24
        {
25
                return self::badResponse('Broken response xml response.');
×
26
        }
27

28
        public static function badResponse(
29
                string $statusText,
30
                int $statusCode = 0,
31
        ): self
32
        {
33
                return new self($statusText, $statusCode);
×
34
        }
35

36
        public static function fromException(Throwable $exception): self
37
        {
38
                return new self($exception->getMessage(), $exception->getCode(), $exception);
×
39
        }
40

41
}
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