From 50d27ee1863907d3eb5ac9b08454b369ce34e65c Mon Sep 17 00:00:00 2001 From: sunxyw Date: Fri, 15 Apr 2022 23:43:21 +0800 Subject: [PATCH] add show-debug option to api docs generator --- bin/gendoc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/bin/gendoc b/bin/gendoc index 87bb2147..b14bd9e6 100755 --- a/bin/gendoc +++ b/bin/gendoc @@ -91,16 +91,15 @@ use Jasny\PhpdocParser\Set\PhpDocumentor; use Jasny\PhpdocParser\Tag\Summery; use ZM\Console\Console; -var_dump('hi'); +$opts = getopt('', ['show-warnings', 'show-debug']); -$opts = getopt('', ['show-warnings']); if (array_key_exists('show-warnings', $opts)) { $show_warnings = true; } else { $show_warnings = false; } -Console::init(4); +Console::init(array_key_exists('show-debug', $opts) ? 4 : 2); $errors = []; $warnings = [];