Skip to content
Snippets Groups Projects
Commit bce853e1 authored by Stein Magne Bjorklund's avatar Stein Magne Bjorklund
Browse files

Cleanup Importer::search()

parent 08dd2eb5
No related branches found
No related tags found
1 merge request!18Resolve "Remove all use of GLOBALS"
......@@ -298,13 +298,16 @@ final class Importer
}
}
private function search($graph, $s = null, $p = null, $o = null)
private function search($graph, $s = null, $p = null, $o = null): array
{
$results = array();
foreach ($graph as $v) {
$threeOks = 0;
//Check subject
/**
* Check subject
*/
if ($s != null) {
if ($v['s'] == $s) {
$threeOks++;
......@@ -313,7 +316,9 @@ final class Importer
$threeOks++;
}
//Check predicate
/**
* Check predicate.
*/
if ($p != null) {
if ($v['p'] == $p) {
$threeOks++;
......@@ -322,7 +327,9 @@ final class Importer
$threeOks++;
}
//Check object
/**
* Check object.
*/
if ($o != null) {
if ($v['o'] == $o) {
$threeOks++;
......@@ -335,8 +342,8 @@ final class Importer
array_push($results, $v);
}
}
return $results;
//$this->showFinishing();
}
private function showInterface(): void
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment