Completed
Branch master (7d7b3f)
by Ori
01:38
created

Resource   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A load() 0 6 1
A create() 0 7 1
1
<?php
2
3
namespace frictionlessdata\datapackage;
4
5
class Resource
6
{
7
    public static function load($descriptor, $basePath = null)
8
    {
9
        $descriptor = Utils::objectify($descriptor);
10
11
        return Factory::resource($descriptor, $basePath);
12
    }
13
14
    public static function create($descriptor, $basePath = null)
15
    {
16
        $descriptor = Utils::objectify($descriptor);
17
        $skipValidations = true;
18
19
        return Factory::resource($descriptor, $basePath, $skipValidations);
20
    }
21
}
22