mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
Add phpstan version in report
This commit is contained in:
parent
7c8baea64f
commit
29b6d6b918
|
|
@ -139,6 +139,15 @@ if ($dirscc != 'disabled') {
|
|||
}
|
||||
|
||||
// Get technical debt with PHPStan
|
||||
$output_arrtd = array();
|
||||
if ($dirphpstan != 'disabled') {
|
||||
$commandcheck = ($dirphpstan ? $dirphpstan.'/' : '').'phpstan --version';
|
||||
print 'Execute PHPStan to get the version: '.$commandcheck."\n";
|
||||
$resexectd = 0;
|
||||
exec($commandcheck, $output_arrtd, $resexectd);
|
||||
}
|
||||
$phpstanversion = $output_arrtd[0];
|
||||
|
||||
$output_arrtd = array();
|
||||
if ($dirphpstan != 'disabled') {
|
||||
$commandcheck = ($dirphpstan ? $dirphpstan.'/' : '').'phpstan --level='.$phpstanlevel.' -v analyze -a build/phpstan/bootstrap.php --memory-limit 5G --error-format=github';
|
||||
|
|
@ -1035,7 +1044,7 @@ if ($dirphpstan != 'disabled') {
|
|||
]});
|
||||
';
|
||||
$html .= '<section class="chapter" id="technicaldebt">'."\n";
|
||||
$html .= '<h2><span class="fas fa-book-dead pictofixedwidth"></span>Technical debt <span class="opacitymedium">(PHPStan level '.$phpstanlevel.' -> '.$nblines.' warnings)</span></h2>'."\n";
|
||||
$html .= '<h2><span class="fas fa-book-dead pictofixedwidth"></span>Technical debt <span class="opacitymedium">('.$phpstanversion.' - level '.$phpstanlevel.' -> '.$nblines.' warnings)</span></h2>'."\n";
|
||||
|
||||
$html .= '<div class="boxallwidth">'."\n";
|
||||
$html .= '<div class="div-table-responsive">'."\n";
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user