Skip to content

Commit 2b6e248

Browse files
committed
fix: temporary remove ParseFile()
1 parent 7a4b54d commit 2b6e248

File tree

1 file changed

+18
-18
lines changed

1 file changed

+18
-18
lines changed

src/Parser.php

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -47,23 +47,24 @@ public function parse(string $content): PublicCode
4747
* @throws ParserException
4848
* @throws ValidationException
4949
*/
50-
public function parseFile(string $filePath): PublicCode
51-
{
52-
if (!file_exists($filePath)) {
53-
throw new ParserException("File not found: {$filePath}");
54-
}
55-
56-
$options = FFI::new('struct ParseOptions');
57-
$options->DisableNetwork = $this->options->isDisableNetwork();
58-
59-
$result = $this->ffi->ParseFile($filePath, FFI::addr($options));
60-
61-
if ($result === null) {
62-
throw new ParserException('Failed to parse publiccode.yml file');
63-
}
64-
65-
return $this->processResult($result);
66-
}
50+
/* FIXME: re-enable */
51+
/* public function parseFile(string $filePath): PublicCode */
52+
/* { */
53+
/* if (!file_exists($filePath)) { */
54+
/* throw new ParserException("File not found: {$filePath}"); */
55+
/* } */
56+
/**/
57+
/* $options = FFI::new('struct ParseOptions'); */
58+
/* $options->DisableNetwork = $this->options->isDisableNetwork(); */
59+
/**/
60+
/* $result = $this->ffi->ParseFile($filePath, FFI::addr($options)); */
61+
/**/
62+
/* if ($result === null) { */
63+
/* throw new ParserException('Failed to parse publiccode.yml file'); */
64+
/* } */
65+
/**/
66+
/* return $this->processResult($result); */
67+
/* } */
6768

6869
/**
6970
* Validate publiccode.yml file without parsing
@@ -109,7 +110,6 @@ private function getFFI(): FFI
109110
char** Errors;
110111
} ParseResult;
111112
112-
ParseResult* ParseFile(const char* filepath, ParseOptions* options);
113113
ParseResult* ParseString(const char* content);
114114
void FreeResult(ParseResult* result);
115115
CDEF;

0 commit comments

Comments
 (0)