Completed
Push — master ( 580028...d7e9e8 )
by Charles
02:19
created

Response   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
c 1
b 0
f 0
lcom 0
cbo 1
dl 0
loc 15
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A defaultFormatters() 0 7 1
1
<?php
2
3
namespace yrc\web;
4
5
use yii\web\Response as YiiResponse;
6
use Yii;
7
8
class Response extends YiiResponse
9
{
10
    const FORMAT_JSON25519 = 'json+25519';
11
12
    /**
13
     * @return array the formatters that are supported by default
14
     */
15
    protected function defaultFormatters()
16
    {
17
        $formatters = parent::defaultFormatters();
18
        $formatters[self::FORMAT_JSON25519] = 'yrc\web\Json25519ResponseFormatter';
19
20
        return $formatters;
21
    }
22
}