Completed
Push — master ( fba866...b10a48 )
by Ori
03:03
created

Utils   A

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
namespace frictionlessdata\tableschema;
3
4
// TODO: refactor to an independenct package (used by both tableschema and datapackage)
5
class Utils
6
{
7
    public static function isJsonString($json)
8
    {
9
        return (
10
            is_string($json)
11
            && (strpos(ltrim($json), "{") === 0)
12
        );
13
    }
14
}
15