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

ContentTypeItem::isJson()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 2
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 2
rs 10
c 0
b 0
f 0
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