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

h4kuna / ares / 15408307146

30 May 2025 03:51PM UTC coverage: 83.105% (-1.8%) from 84.928%
15408307146

push

github

web-flow
Merge pull request #48 from h4kuna/update-phpstan

Update phpstan

15 of 42 new or added lines in 17 files covered. (35.71%)

364 of 438 relevant lines covered (83.11%)

0.83 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
        ) {
NEW
18
                $this->code = $code;
×
NEW
19
                parent::__construct($message, $previous);
×
20
        }
21

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

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

32
        public static function fromException(Throwable $exception): self
33
        {
NEW
34
                return new self($exception->getMessage(), $exception->getCode(), $exception);
×
35
        }
36

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