Skip to content

Commit

Permalink
[#14213] - Updated the api generation script for better namespaces
Browse files Browse the repository at this point in the history
  • Loading branch information
niden committed Jul 4, 2019
1 parent 4aa90cd commit 2bb261a
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion tests/_ci/generate-api-docs.php
Original file line number Diff line number Diff line change
Expand Up @@ -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];
}
Expand Down Expand Up @@ -148,6 +153,8 @@
}
}

$outputDoc = str_replace('.zep', '', $outputDoc);

file_put_contents(
$outputDir . $outputDoc,
$output
Expand Down Expand Up @@ -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'])) {
Expand Down

0 comments on commit 2bb261a

Please sign in to comment.