@@ -44,11 +44,11 @@ public function __destruct()
4444 * Parse publiccode.yml content
4545 *
4646 * @param string $content YAML content
47- * @return PublicCode
47+ * @return PublicCodeV0
4848 * @throws ParserException
4949 * @throws ValidationException
5050 */
51- public function parse (string $ content ): PublicCode
51+ public function parse (string $ content ): PublicCodeV0
5252 {
5353 /** @phpstan-ignore-next-line */
5454 $ result = $ this ->ffi ->ParseString ($ this ->handle , $ content );
@@ -64,11 +64,11 @@ public function parse(string $content): PublicCode
6464 * Parse a publiccode.yml file
6565 *
6666 * @param string $filePath Path to publiccode.yml
67- * @return PublicCode
67+ * @return PublicCodeV0
6868 * @throws ParserException
6969 * @throws ValidationException
7070 */
71- public function parseFile (string $ filePath ): PublicCode
71+ public function parseFile (string $ filePath ): PublicCodeV0
7272 {
7373 /** @phpstan-ignore-next-line */
7474 $ result = $ this ->ffi ->ParseFile ($ this ->handle , $ filePath );
@@ -172,11 +172,11 @@ private function findLibrary(): string
172172 * Process FFI result and convert to PublicCode object
173173 *
174174 * @param mixed $result FFI ParseResult pointer
175- * @return PublicCode
175+ * @return PublicCodeV0
176176 * @throws ValidationException
177177 * @throws ParserException
178178 */
179- private function processResult ($ result ): PublicCode
179+ private function processResult ($ result ): PublicCodeV0
180180 {
181181 if ($ result ->ErrorCount > 0 ) {
182182 /** @var list<non-empty-string> */
@@ -219,6 +219,6 @@ private function processResult($result): PublicCode
219219 throw new ParserException ('Failed to decode JSON data: ' . json_last_error_msg ());
220220 }
221221
222- return new PublicCode ($ data );
222+ return new PublicCodeV0 ($ data );
223223 }
224224}
0 commit comments