CreateTaskResponse   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A getTaskId() 0 7 2
1
<?php
2
3
namespace Anticaptcha\Response;
4
5
final class CreateTaskResponse extends AbstractResponse
6
{
7
    public ?int $taskId = null;
8
9
    public function getTaskId(): int
10
    {
11
        if (empty($this->taskId)) {
12
            throw new \RuntimeException('Response is failed.');
13
        }
14
15
        return $this->taskId;
16
    }
17
}
18