for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace GitHub;
use FileFetcher\FileFetcher;
use FileFetcher\FileFetchingException;
/**
* @licence GNU GPL v2+
* @author Jeroen De Dauw < [email protected] >
*/
class MediaWikiFileFetcher implements FileFetcher {
public function fetchFile( string $fileUrl ): string {
$result = \Http::get( $fileUrl );
if ( !is_string( $result ) ) {
throw new FileFetchingException( $fileUrl );
}
return $result;