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

ServiceUnavailable::getRetryAfter()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 1 Features 0
Metric Value
c 1
b 1
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
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