1 | <?php |
||
12 | class GitHubFetcher { |
||
13 | |||
14 | private $fileFetcher; |
||
15 | private $gitHubUrl; |
||
16 | private $repositoryWhitelist; |
||
17 | |||
18 | /** |
||
19 | * @param FileFetcher $fileFetcher |
||
20 | * @param string $gitHubUrl |
||
21 | * @param string[] $repositoryWhitelist Empty for no restrictions |
||
22 | */ |
||
23 | 2 | public function __construct( FileFetcher $fileFetcher, string $gitHubUrl, array $repositoryWhitelist ) { |
|
28 | |||
29 | 2 | public function getFileContent( string $repoName, string $branchName, string $fileName ): string { |
|
43 | |||
44 | 2 | private function repoIsAllowed( string $repoName ): bool { |
|
48 | |||
49 | 1 | private function getFileUrl( string $repoName, string $branchName, string $fileName ): string { |
|
58 | |||
59 | } |
||
60 |