Utils   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 0
dl 0
loc 10
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A isJsonString() 0 7 2
1
<?php
2
3
namespace frictionlessdata\tableschema;
4
5
// TODO: refactor to an independenct package (used by both tableschema and datapackage)
6
class Utils
7
{
8
    public static function isJsonString($json)
9
    {
10
        return
11
            is_string($json)
12
            && (strpos(ltrim($json), '{') === 0)
13
        ;
14
    }
15
}
16