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