diff options
author | Thomas Bruederli <thomas@roundcube.net> | 2013-09-20 19:46:51 +0200 |
---|---|---|
committer | Thomas Bruederli <thomas@roundcube.net> | 2013-09-20 19:46:51 +0200 |
commit | 012a65af50b93e0529720a48db6a34974a92c37c (patch) | |
tree | 573ec47875f6c6ff87386b89c4b0efe1f51a5277 /bin/package2composer.sh | |
parent | 8e785956c1f69526aa34eb1c8d507c02d10f6400 (diff) |
Use XML nodes as iterator
Diffstat (limited to 'bin/package2composer.sh')
-rwxr-xr-x | bin/package2composer.sh | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/bin/package2composer.sh b/bin/package2composer.sh index 165018d2f..cb43644e7 100755 --- a/bin/package2composer.sh +++ b/bin/package2composer.sh @@ -54,18 +54,17 @@ if ($package->license) { } if ($package->lead) { - $data['authors'][] = array( - 'name' => strval($package->lead->name), - 'email' => strval($package->lead->email), - 'role' => 'Lead', - ); + foreach ($package->lead as $lead) { + $data['authors'][] = array( + 'name' => strval($lead->name), + 'email' => strval($lead->email), + 'role' => 'Lead', + ); + } } if ($devs = $package->developer) { - if (!is_array($devs)) { - $devs = array($package->developer); - } - foreach ($devs as $dev) { + foreach ($package->developer as $dev) { $data['authors'][] = array( 'name' => strval($dev->name), 'email' => strval($dev->email), |