Passed
Push — master ( 617266...2422af )
by Siim
10:33
created

DefaultRequest   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 7
dl 0
loc 21
rs 10
c 0
b 0
f 0
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getCacheTags() 0 4 1
A getCacheExpiresAfter() 0 3 1
1
<?php
2
/**
3
 * Created by PhpStorm.
4
 * User: siim
5
 * Date: 18.01.19
6
 * Time: 9:10
7
 */
8
9
namespace Sf4\Api\Request;
10
11
use Sf4\Api\CacheAdapter\CacheKeysInterface;
12
use Sf4\Api\Response\DefaultResponse;
13
14
class DefaultRequest extends AbstractRequest
15
{
16
    const ROUTE = 'sf4_api_default';
17
18
    public function __construct()
19
    {
20
        $this->init(
21
            new DefaultResponse()
22
        );
23
    }
24
25
    protected function getCacheTags(): array
26
    {
27
        return [
28
            CacheKeysInterface::TAG_SITE
29
        ];
30
    }
31
32
    protected function getCacheExpiresAfter(): ?int
33
    {
34
        return null;
35
    }
36
}
37