Test Failed
Push — master ( c83fb3...05e696 )
by Luka
02:24
created

NoopGrant::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Baguette\Mastodon\Grant;
4
5
use Baguette\Mastodon\Service\AuthFactory;
6
use Baguette\Mastodon\Service\Scope;
7
use GuzzleHttp\ClientInterface as Client;
8
9
/**
10
 * Mastodon noop grant class
11
 *
12
 * @author    USAMI Kenta <[email protected]>
13
 * @copyright 2017 Baguette HQ
14
 * @license   https://www.gnu.org/licenses/gpl-3.0.html GPL-3.0
15
 */
16
class NoopGrant extends Grant
17
{
18
    public function __construct()
19
    {
20
        // noop
21
    }
22
23
    /**
24
     * @param Client      $http
25
     * @param AuthFactory $factory
26
     * @param Scope       $scope
27
     */
28
    public function auth(Client $http, AuthFactory $factory, Scope $scope)
29
    {
30
        throw new \RuntimeException(sprintf('%s cannot authorize.', __CLASS__));
31
    }
32
}
33