Skip to content

Commit 744bff6

Browse files
committed
Replaced continue statement with an elseif
1 parent 014a960 commit 744bff6

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

Symfony/src/Codebender/LibraryBundle/Handler/DefaultHandler.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -342,13 +342,13 @@ public function getGithubRepoCode($owner, $repo, $branch, $path)
342342
return $code;
343343
}
344344
$libraryContents['contents'][] = $code['file'];
345-
continue;
346-
}
347-
$directoryContents = $this->getGithubRepoCode($owner, $repo, $branch, $element['path']);
348-
if ($directoryContents['success'] !== true) {
349-
return $directoryContents;
345+
} elseif ($element['type'] == 'dir') {
346+
$directoryContents = $this->getGithubRepoCode($owner, $repo, $branch, $element['path']);
347+
if ($directoryContents['success'] !== true) {
348+
return $directoryContents;
349+
}
350+
$libraryContents['contents'][] = $directoryContents['library'];
350351
}
351-
$libraryContents['contents'][] = $directoryContents['library'];
352352
}
353353

354354
return array('success' => true, 'library' => $libraryContents);

0 commit comments

Comments
 (0)