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

lmc-eu / matej-client-php / 7529439147

15 Jan 2024 01:18PM UTC coverage: 100.0%. Remained the same
7529439147

Pull #145

github

web-flow
Bump actions/checkout from 3 to 4

Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Pull Request #145: Bump actions/checkout from 3 to 4

712 of 712 relevant lines covered (100.0%)

35.03 hits per line

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

100.0
/src/Exception/RequestException.php
1
<?php declare(strict_types=1);
2

3
namespace Lmc\Matej\Exception;
4

5
use Http\Client\Exception;
6
use Psr\Http\Message\RequestInterface;
7
use Psr\Http\Message\ResponseInterface;
8

9
/**
10
 * Generic exception thrown when error occurs during request execution.
11
 * Some more specific child exception could be thrown instead.
12
 */
13
class RequestException extends \RuntimeException implements MatejExceptionInterface, Exception
14
{
15
    /** @var RequestInterface */
16
    private $request;
17
    /** @var ResponseInterface */
18
    private $response;
19

20
    public function __construct(
21
        string $message,
22
        RequestInterface $request,
23
        ResponseInterface $response,
24
        \Throwable $previous = null
25
    ) {
26
        $code = $response->getStatusCode();
49✔
27
        $this->request = $request;
49✔
28
        $this->response = $response;
49✔
29

30
        parent::__construct($message, $code, $previous);
49✔
31
    }
32

33
    public function getRequest(): RequestInterface
34
    {
35
        return $this->request;
14✔
36
    }
37

38
    public function getResponse(): ResponseInterface
39
    {
40
        return $this->response;
14✔
41
    }
42
}
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