Passed
Branch feature/second-release (e9200f)
by Andrea Marco
13:37
created

OutOfAttemptsException   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 3
Bugs 0 Features 0
Metric Value
eloc 2
dl 0
loc 14
ccs 2
cts 2
cp 1
rs 10
c 3
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
1
<?php
2
3
namespace Cerbero\LazyJsonPages\Exceptions;
4
5
use GuzzleHttp\Exception\TransferException;
6
use Illuminate\Support\LazyCollection;
7
8
/**
9
 * The exception thrown when an HTTP request failed too many times.
10
 */
11
class OutOfAttemptsException extends LazyJsonPagesException
12
{
13
    /**
14
     * Instantiate the class.
15
     *
16
     * @param array<int, int> $failedPages
17
     * @param LazyCollection<int, mixed> $items
18
     */
19 1
    public function __construct(
20
        TransferException $e,
21
        public readonly array $failedPages,
22
        public readonly LazyCollection $items,
23
    ) {
24 1
        parent::__construct($e->getMessage(), 0, $e);
25
    }
26
}
27