Conditions | 2 |
Paths | 2 |
Total Lines | 10 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 2.0116 |
Changes | 0 |
1 | <?php |
||
16 | 3 | public function load_page(string $wikiword) : net_nemein_wiki_wikipage |
|
17 | { |
||
18 | 3 | $qb = net_nemein_wiki_wikipage::new_query_builder(); |
|
19 | 3 | $qb->add_constraint('topic', '=', $this->_topic->id); |
|
|
|||
20 | 3 | $qb->add_constraint('name', '=', $wikiword); |
|
21 | |||
22 | 3 | if ($result = $qb->execute()) { |
|
23 | 3 | return $result[0]; |
|
24 | } |
||
25 | throw new midcom_error_notfound('The page "' . $wikiword . '" could not be found.'); |
||
26 | } |
||
41 |