Completed
Push — master ( 765a46...8c9912 )
by Hector
03:05
created

ServiceUnavailable   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 1
Bugs 1 Features 0
Metric Value
wmc 2
c 1
b 1
f 0
lcom 0
cbo 1
dl 0
loc 18
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getRetryAfter() 0 4 1
1
<?php
2
3
namespace Hborras\TwitterAdsSDK\TwitterAds\Errors;
4
5
use Exception;
6
use Hborras\TwitterAdsSDK\TwitterAdsException;
7
8
class ServiceUnavailable extends TwitterAdsException
9
{
10
    private $retryAfter;
11
12
    public function __construct($message, $code, Exception $previous = null, $errors, $headers)
13
    {
14
        parent::__construct($message, $code, null, $errors);
15
        $this->retryAfter = $headers['retry-after'];
16
    }
17
18
    /**
19
     * @return mixed
20
     */
21
    public function getRetryAfter()
22
    {
23
        return $this->retryAfter;
24
    }
25
}
26
27
28