Passed
Pull Request — master (#1412)
by Jakob
04:10
created

SkosmosTurtleParser::parseGraph()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 3
nc 1
nop 2
dl 0
loc 5
rs 10
c 0
b 0
f 0
1
<?php
2
3
class SkosmosTurtleParser extends EasyRdf\Parser\Turtle
4
{
5
    /**
6
     * Returns the namespace prefixes as an array of prefix => URI
7
     * @return array $namespaces
8
     */
9
    public function getNamespaces()
10
    {
11
        return $this->namespaces;
12
    }
13
14
    /**
15
     * Parse Turtle into a new Graph and return it.
16
     * @return EasyRdf\Graph
17
     */
18
    public function parseGraph($data, $baseUri)
19
    {
20
        $graph = new EasyRdf\Graph();
21
        $this->parse($graph, $data, 'turtle', $baseUri);
22
        return $graph;
23
    }
24
}
25