ldc-crm/tests/coverage/Models/dashboard.html
2023-06-30 15:02:45 +02:00

307 lines
16 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Dashboard for /home/jeremy/projets/crm/app/Models</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="../_css/bootstrap.min.css" rel="stylesheet" type="text/css">
<link href="../_css/nv.d3.min.css" rel="stylesheet" type="text/css">
<link href="../_css/style.css" rel="stylesheet" type="text/css">
<link href="../_css/custom.css" rel="stylesheet" type="text/css">
</head>
<body>
<header>
<div class="container-fluid">
<div class="row">
<div class="col-md-12">
<nav aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="../index.html">/home/jeremy/projets/crm/app</a></li>
<li class="breadcrumb-item"><a href="index.html">Models</a></li>
<li class="breadcrumb-item active">(Dashboard)</li>
</ol>
</nav>
</div>
</div>
</div>
</header>
<div class="container-fluid">
<div class="row">
<div class="col-md-12">
<h2>Classes</h2>
</div>
</div>
<div class="row">
<div class="col-md-6">
<h3>Coverage Distribution</h3>
<div id="classCoverageDistribution" style="height: 300px;">
<svg></svg>
</div>
</div>
<div class="col-md-6">
<h3>Complexity</h3>
<div id="classComplexity" style="height: 300px;">
<svg></svg>
</div>
</div>
</div>
<div class="row">
<div class="col-md-6">
<h3>Insufficient Coverage</h3>
<div class="scrollbox">
<table class="table">
<thead>
<tr>
<th>Class</th>
<th class="text-right">Coverage</th>
</tr>
</thead>
<tbody>
<tr><td><a href="BrandStat.php.html#7">App\Models\BrandStat</a></td><td class="text-right">25%</td></tr>
<tr><td><a href="Brand.php.html#9">App\Models\Brand</a></td><td class="text-right">50%</td></tr>
<tr><td><a href="Service.php.html#17">App\Models\Service</a></td><td class="text-right">70%</td></tr>
<tr><td><a href="CustomerInfo.php.html#12">App\Models\CustomerInfo</a></td><td class="text-right">77%</td></tr>
</tbody>
</table>
</div>
</div>
<div class="col-md-6">
<h3>Project Risks</h3>
<div class="scrollbox">
<table class="table">
<thead>
<tr>
<th>Class</th>
<th class="text-right"><abbr title="Change Risk Anti-Patterns (CRAP) Index">CRAP</abbr></th>
</tr>
</thead>
<tbody>
<tr><td><a href="Service.php.html#17">App\Models\Service</a></td><td class="text-right">22</td></tr>
<tr><td><a href="BrandStat.php.html#7">App\Models\BrandStat</a></td><td class="text-right">6</td></tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<h2>Methods</h2>
</div>
</div>
<div class="row">
<div class="col-md-6">
<h3>Coverage Distribution</h3>
<div id="methodCoverageDistribution" style="height: 300px;">
<svg></svg>
</div>
</div>
<div class="col-md-6">
<h3>Complexity</h3>
<div id="methodComplexity" style="height: 300px;">
<svg></svg>
</div>
</div>
</div>
<div class="row">
<div class="col-md-6">
<h3>Insufficient Coverage</h3>
<div class="scrollbox">
<table class="table">
<thead>
<tr>
<th>Method</th>
<th class="text-right">Coverage</th>
</tr>
</thead>
<tbody>
<tr><td><a href="Brand.php.html#105"><abbr title="App\Models\Brand::customerInfos">customerInfos</abbr></a></td><td class="text-right">0%</td></tr>
<tr><td><a href="Brand.php.html#115"><abbr title="App\Models\Brand::servicesStats">servicesStats</abbr></a></td><td class="text-right">0%</td></tr>
<tr><td><a href="Brand.php.html#125"><abbr title="App\Models\Brand::singleOptins">singleOptins</abbr></a></td><td class="text-right">0%</td></tr>
<tr><td><a href="Brand.php.html#137"><abbr title="App\Models\Brand::getAccountsAttribute">getAccountsAttribute</abbr></a></td><td class="text-right">0%</td></tr>
<tr><td><a href="Brand.php.html#147"><abbr title="App\Models\Brand::getTotalOptinsAttribute">getTotalOptinsAttribute</abbr></a></td><td class="text-right">0%</td></tr>
<tr><td><a href="BrandStat.php.html#57"><abbr title="App\Models\BrandStat::brand">brand</abbr></a></td><td class="text-right">0%</td></tr>
<tr><td><a href="CustomerInfo.php.html#89"><abbr title="App\Models\CustomerInfo::login">login</abbr></a></td><td class="text-right">0%</td></tr>
<tr><td><a href="CustomerInfo.php.html#129"><abbr title="App\Models\CustomerInfo::getFromHashcode">getFromHashcode</abbr></a></td><td class="text-right">0%</td></tr>
<tr><td><a href="Service.php.html#106"><abbr title="App\Models\Service::servicesStats">servicesStats</abbr></a></td><td class="text-right">0%</td></tr>
<tr><td><a href="Service.php.html#118"><abbr title="App\Models\Service::generateBearerToken">generateBearerToken</abbr></a></td><td class="text-right">0%</td></tr>
<tr><td><a href="Service.php.html#132"><abbr title="App\Models\Service::generateBearerPassword">generateBearerPassword</abbr></a></td><td class="text-right">0%</td></tr>
<tr><td><a href="BrandStat.php.html#41"><abbr title="App\Models\BrandStat::booted">booted</abbr></a></td><td class="text-right">33%</td></tr>
<tr><td><a href="Service.php.html#69"><abbr title="App\Models\Service::booted">booted</abbr></a></td><td class="text-right">44%</td></tr>
<tr><td><a href="Brand.php.html#62"><abbr title="App\Models\Brand::booted">booted</abbr></a></td><td class="text-right">50%</td></tr>
<tr><td><a href="Customer.php.html#156"><abbr title="App\Models\Customer::loadBrandData">loadBrandData</abbr></a></td><td class="text-right">80%</td></tr>
</tbody>
</table>
</div>
</div>
<div class="col-md-6">
<h3>Project Risks</h3>
<div class="scrollbox">
<table class="table">
<thead>
<tr>
<th>Method</th>
<th class="text-right"><abbr title="Change Risk Anti-Patterns (CRAP) Index">CRAP</abbr></th>
</tr>
</thead>
<tbody>
<tr><td><a href="Customer.php.html#156"><abbr title="App\Models\Customer::loadBrandData">loadBrandData</abbr></a></td><td class="text-right">5</td></tr>
<tr><td><a href="BrandStat.php.html#41"><abbr title="App\Models\BrandStat::booted">booted</abbr></a></td><td class="text-right">3</td></tr>
</tbody>
</table>
</div>
</div>
</div>
<footer>
<hr/>
<p>
<small>Generated by <a href="https://github.com/sebastianbergmann/php-code-coverage" target="_top">php-code-coverage 9.2.16</a> using <a href="https://secure.php.net/" target="_top">PHP 7.4.33</a> and <a href="https://phpunit.de/">PHPUnit 9.5.23</a> at Fri Jun 30 15:02:11 CEST 2023.</small>
</p>
</footer>
</div>
<script src="../_js/jquery.min.js" type="text/javascript"></script>
<script src="../_js/d3.min.js" type="text/javascript"></script>
<script src="../_js/nv.d3.min.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function() {
nv.addGraph(function() {
var chart = nv.models.multiBarChart();
chart.tooltips(false)
.showControls(false)
.showLegend(false)
.reduceXTicks(false)
.staggerLabels(true)
.yAxis.tickFormat(d3.format('d'));
d3.select('#classCoverageDistribution svg')
.datum(getCoverageDistributionData([0,0,0,1,0,0,1,0,2,0,1,8], "Class Coverage"))
.transition().duration(500).call(chart);
nv.utils.windowResize(chart.update);
return chart;
});
nv.addGraph(function() {
var chart = nv.models.multiBarChart();
chart.tooltips(false)
.showControls(false)
.showLegend(false)
.reduceXTicks(false)
.staggerLabels(true)
.yAxis.tickFormat(d3.format('d'));
d3.select('#methodCoverageDistribution svg')
.datum(getCoverageDistributionData([11,0,0,0,1,1,1,0,0,1,2,38], "Method Coverage"))
.transition().duration(500).call(chart);
nv.utils.windowResize(chart.update);
return chart;
});
function getCoverageDistributionData(data, label) {
var labels = [
'0%',
'0-10%',
'10-20%',
'20-30%',
'30-40%',
'40-50%',
'50-60%',
'60-70%',
'70-80%',
'80-90%',
'90-100%',
'100%'
];
var values = [];
$.each(labels, function(key) {
values.push({x: labels[key], y: data[key]});
});
return [
{
key: label,
values: values,
color: "#4572A7"
}
];
}
nv.addGraph(function() {
var chart = nv.models.scatterChart()
.showDistX(true)
.showDistY(true)
.showLegend(false)
.forceX([0, 100]);
chart.tooltipContent(function(graph) {
return '<p>' + graph.point.class + '</p>';
});
chart.xAxis.axisLabel('Code Coverage (in percent)');
chart.yAxis.axisLabel('Cyclomatic Complexity');
d3.select('#classComplexity svg')
.datum(getComplexityData([[100,2,"<a href=\"Answer.php.html#8\">App\\Models\\Answer<\/a>"],[50,10,"<a href=\"Brand.php.html#9\">App\\Models\\Brand<\/a>"],[25,3,"<a href=\"BrandStat.php.html#7\">App\\Models\\BrandStat<\/a>"],[92.45283018867924,24,"<a href=\"Customer.php.html#11\">App\\Models\\Customer<\/a>"],[100,3,"<a href=\"CustomerAnswer.php.html#7\">App\\Models\\CustomerAnswer<\/a>"],[77.77777777777779,6,"<a href=\"CustomerInfo.php.html#12\">App\\Models\\CustomerInfo<\/a>"],[100,6,"<a href=\"CustomerLogin.php.html#9\">App\\Models\\CustomerLogin<\/a>"],[100,2,"<a href=\"CustomerOptInHistory.php.html#8\">App\\Models\\CustomerOptInHistory<\/a>"],[100,2,"<a href=\"Question.php.html#10\">App\\Models\\Question<\/a>"],[70.73170731707317,16,"<a href=\"Service.php.html#17\">App\\Models\\Service<\/a>"],[100,2,"<a href=\"ServiceStat.php.html#8\">App\\Models\\ServiceStat<\/a>"],[100,2,"<a href=\"SingleOptin.php.html#9\">App\\Models\\SingleOptin<\/a>"],[100,0,"<a href=\"User.php.html#9\">App\\Models\\User<\/a>"]], 'Class Complexity'))
.transition()
.duration(500)
.call(chart);
nv.utils.windowResize(chart.update);
return chart;
});
nv.addGraph(function() {
var chart = nv.models.scatterChart()
.showDistX(true)
.showDistY(true)
.showLegend(false)
.forceX([0, 100]);
chart.tooltipContent(function(graph) {
return '<p>' + graph.point.class + '</p>';
});
chart.xAxis.axisLabel('Code Coverage (in percent)');
chart.yAxis.axisLabel('Method Complexity');
d3.select('#methodComplexity svg')
.datum(getComplexityData([[100,1,"<a href=\"Answer.php.html#28\">App\\Models\\Answer::question<\/a>"],[100,1,"<a href=\"Answer.php.html#38\">App\\Models\\Answer::customers<\/a>"],[100,1,"<a href=\"Brand.php.html#35\">App\\Models\\Brand::__construct<\/a>"],[100,1,"<a href=\"Brand.php.html#50\">App\\Models\\Brand::getCacheBaseTags<\/a>"],[50,1,"<a href=\"Brand.php.html#62\">App\\Models\\Brand::booted<\/a>"],[100,1,"<a href=\"Brand.php.html#85\">App\\Models\\Brand::services<\/a>"],[100,1,"<a href=\"Brand.php.html#95\">App\\Models\\Brand::questions<\/a>"],[0,1,"<a href=\"Brand.php.html#105\">App\\Models\\Brand::customerInfos<\/a>"],[0,1,"<a href=\"Brand.php.html#115\">App\\Models\\Brand::servicesStats<\/a>"],[0,1,"<a href=\"Brand.php.html#125\">App\\Models\\Brand::singleOptins<\/a>"],[0,1,"<a href=\"Brand.php.html#137\">App\\Models\\Brand::getAccountsAttribute<\/a>"],[0,1,"<a href=\"Brand.php.html#147\">App\\Models\\Brand::getTotalOptinsAttribute<\/a>"],[33.33333333333333,2,"<a href=\"BrandStat.php.html#41\">App\\Models\\BrandStat::booted<\/a>"],[0,1,"<a href=\"BrandStat.php.html#57\">App\\Models\\BrandStat::brand<\/a>"],[100,1,"<a href=\"Customer.php.html#35\">App\\Models\\Customer::infos<\/a>"],[100,1,"<a href=\"Customer.php.html#45\">App\\Models\\Customer::logins<\/a>"],[100,1,"<a href=\"Customer.php.html#55\">App\\Models\\Customer::optInHistory<\/a>"],[100,1,"<a href=\"Customer.php.html#65\">App\\Models\\Customer::brands<\/a>"],[100,1,"<a href=\"Customer.php.html#75\">App\\Models\\Customer::answers<\/a>"],[92.3076923076923,6,"<a href=\"Customer.php.html#91\">App\\Models\\Customer::info<\/a>"],[92.3076923076923,6,"<a href=\"Customer.php.html#124\">App\\Models\\Customer::login<\/a>"],[80,5,"<a href=\"Customer.php.html#156\">App\\Models\\Customer::loadBrandData<\/a>"],[100,1,"<a href=\"Customer.php.html#183\">App\\Models\\Customer::setOptIn<\/a>"],[100,1,"<a href=\"Customer.php.html#202\">App\\Models\\Customer::getAnswers<\/a>"],[100,1,"<a href=\"CustomerAnswer.php.html#15\">App\\Models\\CustomerAnswer::getUpdatedAtColumn<\/a>"],[100,1,"<a href=\"CustomerAnswer.php.html#27\">App\\Models\\CustomerAnswer::customer<\/a>"],[100,1,"<a href=\"CustomerAnswer.php.html#37\">App\\Models\\CustomerAnswer::answer<\/a>"],[100,1,"<a href=\"CustomerInfo.php.html#58\">App\\Models\\CustomerInfo::booted<\/a>"],[100,1,"<a href=\"CustomerInfo.php.html#79\">App\\Models\\CustomerInfo::customer<\/a>"],[0,1,"<a href=\"CustomerInfo.php.html#89\">App\\Models\\CustomerInfo::login<\/a>"],[100,1,"<a href=\"CustomerInfo.php.html#99\">App\\Models\\CustomerInfo::brand<\/a>"],[100,1,"<a href=\"CustomerInfo.php.html#113\">App\\Models\\CustomerInfo::getFromEmail<\/a>"],[0,1,"<a href=\"CustomerInfo.php.html#129\">App\\Models\\CustomerInfo::getFromHashcode<\/a>"],[100,3,"<a href=\"CustomerLogin.php.html#45\">App\\Models\\CustomerLogin::booted<\/a>"],[100,1,"<a href=\"CustomerLogin.php.html#66\">App\\Models\\CustomerLogin::customer<\/a>"],[100,1,"<a href=\"CustomerLogin.php.html#76\">App\\Models\\CustomerLogin::brand<\/a>"],[100,1,"<a href=\"CustomerLogin.php.html#88\">App\\Models\\CustomerLogin::passwordMatch<\/a>"],[100,1,"<a href=\"CustomerOptInHistory.php.html#26\">App\\Models\\CustomerOptInHistory::customer<\/a>"],[100,1,"<a href=\"CustomerOptInHistory.php.html#36\">App\\Models\\CustomerOptInHistory::brand<\/a>"],[100,1,"<a href=\"Question.php.html#42\">App\\Models\\Question::brand<\/a>"],[100,1,"<a href=\"Question.php.html#52\">App\\Models\\Question::answers<\/a>"],[100,1,"<a href=\"Service.php.html#43\">App\\Models\\Service::__construct<\/a>"],[100,1,"<a href=\"Service.php.html#57\">App\\Models\\Service::getCacheBaseTags<\/a>"],[44.44444444444444,1,"<a href=\"Service.php.html#69\">App\\Models\\Service::booted<\/a>"],[100,1,"<a href=\"Service.php.html#96\">App\\Models\\Service::brand<\/a>"],[0,1,"<a href=\"Service.php.html#106\">App\\Models\\Service::servicesStats<\/a>"],[0,1,"<a href=\"Service.php.html#118\">App\\Models\\Service::generateBearerToken<\/a>"],[0,1,"<a href=\"Service.php.html#132\">App\\Models\\Service::generateBearerPassword<\/a>"],[100,1,"<a href=\"Service.php.html#144\">App\\Models\\Service::incrementStat<\/a>"],[100,5,"<a href=\"Service.php.html#159\">App\\Models\\Service::getFromBearerToken<\/a>"],[100,3,"<a href=\"Service.php.html#216\">App\\Models\\Service::authenticateApi<\/a>"],[100,1,"<a href=\"ServiceStat.php.html#35\">App\\Models\\ServiceStat::brand<\/a>"],[100,1,"<a href=\"ServiceStat.php.html#45\">App\\Models\\ServiceStat::service<\/a>"],[100,1,"<a href=\"SingleOptin.php.html#48\">App\\Models\\SingleOptin::booted<\/a>"],[100,1,"<a href=\"SingleOptin.php.html#62\">App\\Models\\SingleOptin::brand<\/a>"]], 'Method Complexity'))
.transition()
.duration(500)
.call(chart);
nv.utils.windowResize(chart.update);
return chart;
});
function getComplexityData(data, label) {
var values = [];
$.each(data, function(key) {
var value = Math.round(data[key][0]*100) / 100;
values.push({
x: value,
y: data[key][1],
class: data[key][2],
size: 0.05,
shape: 'diamond'
});
});
return [
{
key: label,
values: values,
color: "#4572A7"
}
];
}
});
</script>
</body>
</html>