File tree 10 files changed +20
-20
lines changed
10 files changed +20
-20
lines changed Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ final class Configuration
32
32
/**
33
33
* @var positive-int
34
34
*/
35
- private int $ numberOfBatches ;
35
+ private int $ totalNumberOfBatches ;
36
36
37
37
/**
38
38
* @param positive-int $numberOfProcesses
@@ -63,7 +63,7 @@ public function __construct(
63
63
? $ numberOfItems
64
64
: $ segmentSize ;
65
65
$ this ->numberOfSegments = (int ) (1 === $ numberOfProcesses ? 1 : ceil ($ numberOfItems / $ segmentSize ));
66
- $ this ->numberOfBatches = (int ) (ceil ($ segmentSize / $ batchSize ) * $ this ->numberOfSegments );
66
+ $ this ->totalNumberOfBatches = (int ) (ceil ($ segmentSize / $ batchSize ) * $ this ->numberOfSegments );
67
67
}
68
68
69
69
/**
@@ -85,8 +85,8 @@ public function getNumberOfSegments(): int
85
85
/**
86
86
* @return positive-int
87
87
*/
88
- public function getNumberOfBatches (): int
88
+ public function getTotalNumberOfBatches (): int
89
89
{
90
- return $ this ->numberOfBatches ;
90
+ return $ this ->totalNumberOfBatches ;
91
91
}
92
92
}
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ public function logConfiguration(
22
22
int $ batchSize ,
23
23
int $ numberOfItems ,
24
24
int $ numberOfSegments ,
25
- int $ numberOfBatches ,
25
+ int $ totalNumberOfBatches ,
26
26
int $ numberOfProcesses ,
27
27
string $ itemName
28
28
): void ;
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ public function logConfiguration(
22
22
int $ batchSize ,
23
23
int $ numberOfItems ,
24
24
int $ numberOfSegments ,
25
- int $ numberOfBatches ,
25
+ int $ totalNumberOfBatches ,
26
26
int $ numberOfProcesses ,
27
27
string $ itemName
28
28
): void {
Original file line number Diff line number Diff line change @@ -48,7 +48,7 @@ public function logConfiguration(
48
48
int $ batchSize ,
49
49
int $ numberOfItems ,
50
50
int $ numberOfSegments ,
51
- int $ numberOfBatches ,
51
+ int $ totalNumberOfBatches ,
52
52
int $ numberOfProcesses ,
53
53
string $ itemName
54
54
): void {
@@ -60,8 +60,8 @@ public function logConfiguration(
60
60
$ batchSize ,
61
61
$ numberOfSegments ,
62
62
1 === $ numberOfSegments ? 'round ' : 'rounds ' ,
63
- $ numberOfBatches ,
64
- 1 === $ numberOfBatches ? 'batch ' : 'batches ' ,
63
+ $ totalNumberOfBatches ,
64
+ 1 === $ totalNumberOfBatches ? 'batch ' : 'batches ' ,
65
65
$ numberOfProcesses ,
66
66
1 === $ numberOfProcesses ? 'process ' : 'processes ' ,
67
67
));
Original file line number Diff line number Diff line change @@ -228,15 +228,15 @@ private function executeMainProcess(
228
228
);
229
229
230
230
$ numberOfSegments = $ config ->getNumberOfSegments ();
231
- $ numberOfBatches = $ config ->getNumberOfBatches ();
231
+ $ totalNumberOfBatches = $ config ->getTotalNumberOfBatches ();
232
232
$ itemName = ($ this ->getItemName )($ numberOfItems );
233
233
234
234
$ logger ->logConfiguration (
235
235
$ segmentSize ,
236
236
$ batchSize ,
237
237
$ numberOfItems ,
238
238
$ numberOfSegments ,
239
- $ numberOfBatches ,
239
+ $ totalNumberOfBatches ,
240
240
$ numberOfProcesses ,
241
241
$ itemName ,
242
242
);
Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ public function test_it_can_be_instantiated(
47
47
48
48
self ::assertSame ($ expectedSegmentSize , $ config ->getSegmentSize ());
49
49
self ::assertSame ($ expectedNumberOfSegments , $ config ->getNumberOfSegments ());
50
- self ::assertSame ($ expectedNumberOfBatches , $ config ->getNumberOfBatches ());
50
+ self ::assertSame ($ expectedNumberOfBatches , $ config ->getTotalNumberOfBatches ());
51
51
}
52
52
53
53
/**
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ public function logConfiguration(
25
25
int $ batchSize ,
26
26
int $ numberOfItems ,
27
27
int $ numberOfSegments ,
28
- int $ numberOfBatches ,
28
+ int $ totalNumberOfBatches ,
29
29
int $ numberOfProcesses ,
30
30
string $ itemName
31
31
): void {
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ public function logConfiguration(
23
23
int $ batchSize ,
24
24
int $ numberOfItems ,
25
25
int $ numberOfSegments ,
26
- int $ numberOfBatches ,
26
+ int $ totalNumberOfBatches ,
27
27
int $ numberOfProcesses ,
28
28
string $ itemName
29
29
): void {
Original file line number Diff line number Diff line change @@ -53,7 +53,7 @@ public function test_it_can_log_the_configuration(
53
53
int $ batchSize ,
54
54
int $ numberOfItems ,
55
55
int $ numberOfSegments ,
56
- int $ numberOfBatches ,
56
+ int $ totalNumberOfBatches ,
57
57
int $ numberOfProcesses ,
58
58
string $ itemName ,
59
59
string $ expected
@@ -63,7 +63,7 @@ public function test_it_can_log_the_configuration(
63
63
$ batchSize ,
64
64
$ numberOfItems ,
65
65
$ numberOfSegments ,
66
- $ numberOfBatches ,
66
+ $ totalNumberOfBatches ,
67
67
$ numberOfProcesses ,
68
68
$ itemName ,
69
69
);
Original file line number Diff line number Diff line change @@ -868,7 +868,7 @@ private static function mainProcessWithChildProcessLaunchedProvider(): iterable
868
868
$ numberOfProcesses = 5 ;
869
869
$ numberOfProcessesDefined = true ;
870
870
$ numberOfSegments = 2 ;
871
- $ numberOfBatches = 2 ;
871
+ $ totalNumberOfBatches = 2 ;
872
872
873
873
$ input = new StringInput ('' );
874
874
$ output = new BufferedOutput ();
@@ -912,7 +912,7 @@ private static function mainProcessWithChildProcessLaunchedProvider(): iterable
912
912
$ batchSize ,
913
913
3 ,
914
914
$ numberOfSegments ,
915
- $ numberOfBatches ,
915
+ $ totalNumberOfBatches ,
916
916
$ numberOfProcesses ,
917
917
'items ' ,
918
918
],
@@ -937,7 +937,7 @@ private static function mainProcessWithoutChildProcessLaunchedProvider(): iterab
937
937
$ segmentSize = 3 ;
938
938
$ numberOfProcesses = 1 ;
939
939
$ numberOfSegments = 1 ;
940
- $ numberOfBatches = 2 ;
940
+ $ totalNumberOfBatches = 2 ;
941
941
942
942
$ input = new StringInput ('' );
943
943
$ output = new BufferedOutput ();
@@ -1003,7 +1003,7 @@ private static function mainProcessWithoutChildProcessLaunchedProvider(): iterab
1003
1003
$ batchSize ,
1004
1004
3 ,
1005
1005
$ numberOfSegments ,
1006
- $ numberOfBatches ,
1006
+ $ totalNumberOfBatches ,
1007
1007
$ numberOfProcesses ,
1008
1008
'items ' ,
1009
1009
],
You can’t perform that action at this time.
0 commit comments