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 ...@@ -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(); $results = array();
foreach ($graph as $v) { foreach ($graph as $v) {
$threeOks = 0; $threeOks = 0;
//Check subject /**
* Check subject
*/
if ($s != null) { if ($s != null) {
if ($v['s'] == $s) { if ($v['s'] == $s) {
$threeOks++; $threeOks++;
...@@ -313,7 +316,9 @@ final class Importer ...@@ -313,7 +316,9 @@ final class Importer
$threeOks++; $threeOks++;
} }
//Check predicate /**
* Check predicate.
*/
if ($p != null) { if ($p != null) {
if ($v['p'] == $p) { if ($v['p'] == $p) {
$threeOks++; $threeOks++;
...@@ -322,7 +327,9 @@ final class Importer ...@@ -322,7 +327,9 @@ final class Importer
$threeOks++; $threeOks++;
} }
//Check object /**
* Check object.
*/
if ($o != null) { if ($o != null) {
if ($v['o'] == $o) { if ($v['o'] == $o) {
$threeOks++; $threeOks++;
...@@ -335,8 +342,8 @@ final class Importer ...@@ -335,8 +342,8 @@ final class Importer
array_push($results, $v); array_push($results, $v);
} }
} }
return $results; return $results;
//$this->showFinishing();
} }
private function showInterface(): void 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