Conditions | 3 |
Paths | 3 |
Total Lines | 14 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
29 | public function getFileContent( string $repoName, string $branchName, string $fileName ): string { |
||
30 | if ( !$this->repoIsAllowed( $repoName ) ) { |
||
31 | return ''; |
||
32 | } |
||
33 | |||
34 | $url = $this->getFileUrl( $repoName, $branchName, $fileName ); |
||
35 | |||
36 | try { |
||
37 | return $this->fileFetcher->fetchFile( $url ); |
||
38 | } |
||
39 | catch ( FileFetchingException $ex ) { |
||
40 | return ''; |
||
41 | } |
||
42 | } |
||
43 | |||
60 |