From 2bb261afc0119ce060db4c706d6b585e918bdb80 Mon Sep 17 00:00:00 2001 From: Nikolaos Dimopoulos Date: Mon, 1 Jul 2019 23:34:39 -0400 Subject: [PATCH] [#14213] - Updated the api generation script for better namespaces --- tests/_ci/generate-api-docs.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/tests/_ci/generate-api-docs.php b/tests/_ci/generate-api-docs.php index 9741fdb50cf..4d86aaac513 100644 --- a/tests/_ci/generate-api-docs.php +++ b/tests/_ci/generate-api-docs.php @@ -26,6 +26,11 @@ if (strpos($fileName, '.zep') > 0) { $key = str_replace('.zep', '', $split[0]); + if ('UrlInterface' === $key) { + $key = 'Url'; + } elseif ('DiInterface' === $key) { + $key = 'Di'; + } } else { $key = $split[0]; } @@ -148,6 +153,8 @@ } } + $outputDoc = str_replace('.zep', '', $outputDoc); + file_put_contents( $outputDir . $outputDoc, $output @@ -199,7 +206,8 @@ function processDocument(string $file): array $signature .= ('class' === $type) ? ' Class ' : ' Interface '; $signature .= $return['namespace'] . '\\' . $item['name']; - $return['signature'] = ltrim(str_replace('Phalcon\\', '', $signature)); + $return['signature'] = ltrim($signature); + //$return['signature'] = ltrim(str_replace('Phalcon\\', '', $signature)); $return['extends'] = $item['extends'] ?? ''; if (true === is_array($return['extends'])) {