mirror of
https://gitee.com/ulthon/ulthon_admin.git
synced 2026-07-01 15:32:48 +08:00
完成删除注释和生成版权
This commit is contained in:
@@ -57,6 +57,7 @@ use PhpParser\Node\Expr\Instanceof_;
|
||||
use PhpParser\Node\Expr\Variable;
|
||||
use PhpParser\Node\Identifier;
|
||||
use PhpParser\Node\Param;
|
||||
use PhpParser\Node\Stmt\Nop;
|
||||
|
||||
class Dist extends Command
|
||||
{
|
||||
@@ -377,9 +378,14 @@ class Dist extends Command
|
||||
$copyright = Config::get('dist.copyright', []);
|
||||
|
||||
foreach ($copyright as $text) {
|
||||
array_unshift($file_stmts, new Comment($text));
|
||||
$copyright_stmts[] = new Comment('// '.$text);
|
||||
}
|
||||
|
||||
$copyright_stmts_item = new Nop();
|
||||
|
||||
$copyright_stmts_item->setAttribute('comments', $copyright_stmts);
|
||||
|
||||
array_unshift($file_stmts, $copyright_stmts_item);
|
||||
|
||||
// 生成代码
|
||||
$result_content = $pretty_printer->prettyPrintFile($file_stmts);
|
||||
|
||||
@@ -79,8 +79,8 @@ return [
|
||||
'官网地址: http://ulthon.com',
|
||||
'后台官网地址: http://admin.demo.ulthon.com',
|
||||
'这不是一个自由软件!也不是一个源码文件!',
|
||||
'不允许对程序代码以任何形式任何目的的再发布',
|
||||
'您正在浏览这段文字说明您正在试图获取或修改代码',
|
||||
'不允许对程序代码以任何形式任何目的的再发布',
|
||||
'任何对当前文件的浏览、修改、反编译都是非法的,没有获取授权的',
|
||||
]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user