Skip to content

Commit

Permalink
fixed CS
Browse files Browse the repository at this point in the history
  • Loading branch information
fabpot committed Oct 8, 2011
1 parent 65b615c commit aefee60
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions pirum
Original file line number Diff line number Diff line change
Expand Up @@ -1220,7 +1220,7 @@ class Pirum_Package
$deps = $this->XMLToArray($this->package->dependencies);
if ($this->package->dependencies->group->count() > 0) {
$deps['group'] = $this->XMLGroupDepsToArray($this->package->dependencies->group);
} // if
}

return serialize($deps);
}
Expand Down Expand Up @@ -1345,24 +1345,21 @@ class Pirum_Package

protected function XMLGroupDepsToArray($xml)
{
if ($xml->count() == 0) return array();
if ($xml->count() == 0) {
return array();
}

$deps = array();
foreach ($xml as $group) {
// Extract group attribs (shared by all children)
$attribs = array();
foreach ($group->attributes() as $key => $val) {
$attribs[$key] = (string) $val;
} // foreach
}

// Create one group dependency per childern
foreach ($group->children() as $type => $value) {
$value = $this->XMLToArray($value);

$deps[] = array(
'attribs' => $attribs,
$type => $value,
);
$deps[] = array('attribs' => $attribs, $type => $this->XMLToArray($value));
}
}

Expand Down

0 comments on commit aefee60

Please sign in to comment.