Project page
This commit is contained in:
23
src/Maintained/Statistics/StatisticsComputer.php
Normal file
23
src/Maintained/Statistics/StatisticsComputer.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
namespace Maintained\Statistics;
|
||||
|
||||
use Maintained\Diagnostic;
|
||||
|
||||
/**
|
||||
* Computes statistics.
|
||||
*
|
||||
* @author Matthieu Napoli <matthieu@mnapoli.fr>
|
||||
*/
|
||||
class StatisticsComputer implements StatisticsProvider
|
||||
{
|
||||
public function getStatistics($user, $repository)
|
||||
{
|
||||
$diagnostic = new Diagnostic($user . '/' . $repository);
|
||||
|
||||
$statistics = new Statistics();
|
||||
$statistics->resolutionTime = $diagnostic->computeMedian();
|
||||
|
||||
return $statistics;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user