Test Failed
Push — master ( aa2fc1...854ec1 )
by 世昌
01:44
created

ContentTypeItem   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 6
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 3
dl 0
loc 6
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A isJson() 0 2 1
1
<?php
2
namespace nebula\request\header;
3
4
/**
5
 * HTTP请求头
6
 *
7
 */
8
class ContentTypeItem extends HeaderItem
9
{
10
    public static $type = 'content-type';
11
12
    public function isJson(): bool {
13
        return strpos($this->value, 'json') !== false;
14
    }
15
}
16