1
0
Fork 0
mirror of https://codeberg.org/demostf/api.git synced 2026-06-04 02:14:06 +02:00
This commit is contained in:
Robin Appelman 2020-11-28 17:12:04 +01:00
commit 7320711a36
23 changed files with 36 additions and 81 deletions

View file

@ -11,8 +11,6 @@ class HeaderParser {
* @param string $head string containing the demo header binary data
*
* @throws InvalidArgumentException
*
* @return Header
*/
public function parseString(string $head): Header {
$info = @unpack(
@ -32,8 +30,6 @@ class HeaderParser {
* @param resource $stream
*
* @throws InvalidArgumentException
*
* @return Header
*/
public function parseStream($stream): Header {
$head = fread($stream, 2048);
@ -44,11 +40,7 @@ class HeaderParser {
/**
* Parse demo info from a local file.
*
* @param string $path
*
* @throws InvalidArgumentException
*
* @return Header
*/
public function parseHeader(string $path): Header {
if (!is_readable($path)) {