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

DefaultResource::getInlineDataStream()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 1
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace frictionlessdata\datapackage\Resources;
4
5
use frictionlessdata\datapackage\DataStreams\DefaultDataStream;
6
7
class DefaultResource extends BaseResource
8
{
9
    /**
10
     * @param string $dataSource
11
     *
12
     * @return DefaultDataStream
13
     */
14
    protected function getDataStream($dataSource, $dataSourceOptions = null)
15
    {
16
        return new DefaultDataStream($this->normalizeDataSource($dataSource, $this->basePath), $dataSourceOptions);
17
    }
18
19
    protected function getInlineDataStream($data)
20
    {
21
        return $data;
22
    }
23
24
    protected static function handlesProfile($profile)
25
    {
26
        return $profile == 'data-resource';
27
    }
28
}
29