Passed
Push — master ( 4d49b1...530588 )
by Valentin
03:01 queued 11s
created

JsonPayloadConfig   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
eloc 6
c 1
b 0
f 0
dl 0
loc 17
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A getContentTypes() 0 3 1
1
<?php
2
3
/**
4
 * Spiral Framework.
5
 *
6
 * @license   MIT
7
 * @author    Pavel Z
8
 */
9
10
declare(strict_types=1);
11
12
namespace Spiral\Config;
13
14
use Spiral\Core\InjectableConfig;
15
16
class JsonPayloadConfig extends InjectableConfig
17
{
18
    public const CONFIG = 'json-payload';
19
20
    /** @var array */
21
    protected $config = [
22
        'contentTypes' => [
23
            'application/json'
24
        ]
25
    ];
26
27
    /**
28
     * @return mixed
29
     */
30
    public function getContentTypes(): array
31
    {
32
        return $this->config['contentTypes'];
33
    }
34
}
35