for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Queryr\Replicator\Importer;
use Exception;
use Queryr\Replicator\Model\EntityPage;
/**
* @licence GNU GPL v2+
* @author Jeroen De Dauw < [email protected] >
*/
class StatsTrackingReporter implements PageImportReporter {
private $reporter;
* @var ImportStats
private $stats;
public function __construct( PageImportReporter $reporter ) {
$this->reporter = $reporter;
$this->stats = new ImportStats();
}
public function started( EntityPage $entityPage ) {
$this->reporter->started( $entityPage );
public function endedSuccessfully() {
$this->reporter->endedSuccessfully();
$this->stats->recordSuccess();
public function endedWithError( Exception $ex ) {
$this->reporter->endedWithError( $ex );
$this->stats->recordError( $ex );
public function stepStarted( string $message ) {
$this->reporter->stepStarted( $message );
public function stepCompleted() {
$this->reporter->stepCompleted();
public function getStats() {
return $this->stats;