Skip to content

Commit

Permalink
Fixed up formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
lordtatty committed Jul 22, 2015
1 parent 60d0e3c commit a895200
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions src/classes/ExtendedGraph.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ public function add_literal_triple($s, $p, $o, $lang = null, $dt = null) {
* @param string $s
* @param string $p
* @param array $o_info
* @throws Exceptions\Exception
* @return bool
*/
private function _add_triple($s, $p, Array $o_info) {
Expand All @@ -186,19 +187,19 @@ private function _add_triple($s, $p, Array $o_info) {
if(!$this->isValidResourceValue($p)){
throw new \Tripod\Exceptions\Exception("The predicate is invalid");
}
if (!isset($this->_index[$s])) {
$this->_index[$s] = array();
$this->_index[$s][$p] = array($o_info);
return true;
} elseif (!isset($this->_index[$s][$p])) {
$this->_index[$s][$p] = array($o_info);
if (!isset($this->_index[$s])) {
$this->_index[$s] = array();
$this->_index[$s][$p] = array($o_info);
return true;
} elseif (!isset($this->_index[$s][$p])) {
$this->_index[$s][$p] = array($o_info);
return true;
} else {
if (!in_array($o_info, $this->_index[$s][$p])) {
$this->_index[$s][$p][] = $o_info;
return true;
} else {
if (!in_array($o_info, $this->_index[$s][$p])) {
$this->_index[$s][$p][] = $o_info;
return true;
}
}
}
return false;
}

Expand Down

0 comments on commit a895200

Please sign in to comment.