Conditions | 1 |
Paths | 1 |
Total Lines | 18 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
14 | public function parse(Definitions $definitions): TypeCollection |
||
15 | { |
||
16 | $types = $definitions |
||
17 | ->query('[typeof="rdfs:Class"]') |
||
18 | ->each(function (Crawler $crawler) { |
||
19 | return call_user_func(ParseType::fromCrawler($crawler)); |
||
20 | }); |
||
21 | |||
22 | $properties = $definitions |
||
23 | ->query('[typeof="rdf:Property"]') |
||
24 | ->each(function (Crawler $crawler) { |
||
25 | return call_user_func(ParseProperty::fromCrawler($crawler)); |
||
26 | }); |
||
27 | |||
28 | return new TypeCollection( |
||
29 | array_filter($types), array_filter($properties) |
||
30 | ); |
||
31 | } |
||
32 | } |
||
33 |