Completed
Push — master ( 003f88...43488a )
by Daniel
04:26
created

InsufficientScopeException::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 5
nc 1
nop 2
dl 0
loc 7
rs 9.4285
c 0
b 0
f 0
1
<?php
2
3
namespace CodeCloud\Bundle\ShopifyBundle\Exception;
4
5
/**
6
 * Thrown when a shop authorization granted different scope than was requested.
7
 */
8
class InsufficientScopeException extends \RuntimeException
9
{
10
    /**
11
     * @param string $requestedScope
12
     * @param string $grantedScope
13
     */
14
    public function __construct(string $requestedScope, string $grantedScope)
15
    {
16
        parent::__construct(
17
            sprintf(
18
                'Insufficient scope. Requested: "%s", granted: "%s".',
19
                $requestedScope,
20
                $grantedScope
21
            )
22
        );
23
    }
24
}
25