Passed
Push — master ( 41f898...747fbd )
by Nate
06:33
created

Request   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
dl 0
loc 17
ccs 0
cts 7
cp 0
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getIsSiteRequest() 0 3 1
A getIsRestRequest() 0 3 1
1
<?php
2
3
/**
4
 * @copyright  Copyright (c) Flipbox Digital Limited
5
 * @license    https://flipboxfactory.com/software/transformer/license
6
 * @link       https://www.flipboxfactory.com/software/transformer/
7
 */
8
9
namespace flipbox\craft\rest;
10
11
use Craft;
12
use craft\base\RequestTrait;
13
use yii\web\HttpException;
14
use craft\helpers\StringHelper;
15
use yii\base\InvalidConfigException;
16
use yii\web\BadRequestHttpException;
17
18
/** @noinspection ClassOverridesFieldOfSuperClassInspection */
19
20
/**
21
 * @inheritdoc
22
 *
23
 * @author Flipbox Factory <[email protected]>
24
 * @since 1.0.0
25
 */
26
class Request extends \craft\web\Request
27
{
28
29
    /**
30
     * @inheritdoc
31
     */
32
    public function getIsRestRequest(): bool
33
    {
34
        return true;
35
    }
36
37
    /**
38
     * @inheritdoc
39
     */
40
    public function getIsSiteRequest(): bool
41
    {
42
        return false;
43
    }
44
}
45