* @copyright 2024 smiley
* @license MIT
*
* @phan-file-suppress PhanTypeArraySuspiciousNullable
*/
declare(strict_types=1);
namespace chillerlan\QRCodeBenchmark;
use RuntimeException;
use function array_keys;
use function copy;
use function file_exists;
use function file_get_contents;
use function file_put_contents;
use function htmlspecialchars;
use function implode;
use function is_bool;
use function is_dir;
use function json_decode;
use function mkdir;
use function sprintf;
require_once __DIR__.'/parse-common.php';
if(!file_exists(FILE.'.json')){
throw new RuntimeException('invalid benchmark report [file_exists()]');
}
$data = file_get_contents(FILE.'.json');
if($data === false){
throw new RuntimeException('invalid benchmark report [file_get_contents()]');
}
$json = json_decode($data, true);
$htmlHead = '