diff --git a/classes/Importer.php b/classes/Importer.php index 3fed8e08f22df8a42380ee7c9e23c1b0175f91fa..1b33e1dc06bd9b585eff73d3693a643f1ab73da6 100644 --- a/classes/Importer.php +++ b/classes/Importer.php @@ -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