-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathResult.php
More file actions
66 lines (52 loc) · 1.38 KB
/
Copy pathResult.php
File metadata and controls
66 lines (52 loc) · 1.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
<?php
declare(strict_types=1);
namespace CodeRhapsodie\DataflowBundle\DataflowType;
/**
* @codeCoverageIgnore
*/
class Result
{
private readonly \DateInterval $elapsed;
private int $successCount;
public function __construct(private readonly string $name, private readonly \DateTimeInterface $startTime, private readonly \DateTimeInterface $endTime, private readonly int $totalProcessedCount, private readonly int $errorCount)
{
$this->elapsed = $startTime->diff($endTime);
$this->successCount = $totalProcessedCount - $this->errorCount;
}
public function getName(): string
{
return $this->name;
}
public function getStartTime(): \DateTimeInterface
{
return $this->startTime;
}
public function getEndTime(): \DateTimeInterface
{
return $this->endTime;
}
public function getElapsed(): \DateInterval
{
return $this->elapsed;
}
public function getErrorCount(): int
{
return $this->errorCount;
}
public function getSuccessCount(): int
{
return $this->successCount;
}
public function getTotalProcessedCount(): int
{
return $this->totalProcessedCount;
}
public function hasErrors(): bool
{
return $this->errorCount > 0;
}
public function getExceptions(): array
{
return $this->exceptions;
}
}