Passed
Pull Request — master (#1412)
by Jakob
05:09
created

SkosmosTurtleParser   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
eloc 5
dl 0
loc 20
rs 10
c 2
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getNamespaces() 0 3 1
A parseGraph() 0 5 1
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