Completed
Push — master ( 699478...5c97e7 )
by Dan Michael O.
02:26
created

UsageLimitExceeded::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 5
rs 9.4285
cc 1
eloc 3
nc 1
nop 2
1
<?php
2
3
namespace Scriptotek\GoogleBooks\Exceptions;
4
5
class UsageLimitExceeded extends GoogleApiException
6
{
7
    /** @var string Reason can be any of:
8
       - 'dailyLimitExceeded' : The Courtesy API limit for your project has been reached.
9
       - 'userRateLimitExceeded': The per-user limit from the Developer Console has been reached.
10
       - 'userRateLimitExceededUnreg': Limit when unregistered
11
       - More?
12
    */
13
    private $reason;
14
15
    public function __construct($message, $reason)
16
    {
17
        parent::__construct($message);
18
        $this->reason = $reason;
19
    }
20
21
    public function getReason()
22
    {
23
        return $this->reason;
24
    }
25
}
26