29 lines
710 B
PHP
29 lines
710 B
PHP
<?php
|
|
|
|
$root = dirname(__DIR__, 2);
|
|
$servicePath = $root . '/server/app/common/service/match/MatchLiveService.php';
|
|
|
|
if (!is_file($servicePath)) {
|
|
fwrite(STDERR, "missing service file\n");
|
|
exit(1);
|
|
}
|
|
|
|
$service = file_get_contents($servicePath);
|
|
$requiredTokens = [
|
|
'class MatchLiveService',
|
|
'public static function syncLegacyLiveUrl',
|
|
'public static function getLiveListForApi',
|
|
'public static function buildStreamOptions',
|
|
'play_url_m3u8',
|
|
'default_play_url',
|
|
];
|
|
|
|
foreach ($requiredTokens as $needle) {
|
|
if (strpos($service, $needle) === false) {
|
|
fwrite(STDERR, "missing service token: {$needle}\n");
|
|
exit(1);
|
|
}
|
|
}
|
|
|
|
echo "service static checks passed\n";
|