@@ -9,25 +9,25 @@ class ReadsSection implements Section
9
9
{
10
10
protected int $ read1Cycles ;
11
11
12
- protected ? int $ read2Cycles ;
12
+ protected int $ index1Cycles ;
13
13
14
- protected ?int $ index1Cycles ;
14
+ protected ?int $ read2Cycles ;
15
15
16
16
protected ?int $ index2Cycles ;
17
17
18
- public function __construct (int $ read1Cycles , ? int $ read2Cycles = null , ?int $ index1Cycles = null , ?int $ index2Cycles = null )
18
+ public function __construct (int $ read1Cycles , int $ index1Cycles , ?int $ read2Cycles = null , ?int $ index2Cycles = null )
19
19
{
20
20
if ($ read1Cycles < 1 ) {
21
21
throw new IlluminaSampleSheetException ('Read1Cycles must be a positive integer. ' );
22
22
}
23
23
if ($ read2Cycles !== null && $ read2Cycles < 1 ) {
24
24
throw new IlluminaSampleSheetException ('Read2Cycles must be a positive integer or null. ' );
25
25
}
26
- if ($ index1Cycles !== null && ( $ index1Cycles < 6 || $ index1Cycles > 12 ) ) {
27
- throw new IlluminaSampleSheetException ('Index1Cycles must be between 6 and 12 or null . ' );
26
+ if ($ index1Cycles < 6 ) {
27
+ throw new IlluminaSampleSheetException ('Index1Cycles must be at least 6 . ' );
28
28
}
29
- if ($ index2Cycles !== null && ($ index2Cycles < 6 || $ index2Cycles > 12 )) {
30
- throw new IlluminaSampleSheetException ('Index2Cycles must be between 6 and 12 or null . ' );
29
+ if ($ index2Cycles !== null && ($ index2Cycles < 6 )) {
30
+ throw new IlluminaSampleSheetException ('Index2Cycles must be at least 6 . ' );
31
31
}
32
32
$ this ->read1Cycles = $ read1Cycles ;
33
33
$ this ->read2Cycles = $ read2Cycles ;
@@ -43,9 +43,9 @@ public function convertSectionToString(): string
43
43
if ($ this ->read2Cycles !== null ) {
44
44
$ readsLines [] = "Read2Cycles, {$ this ->read2Cycles }" ;
45
45
}
46
- if ( $ this -> index1Cycles !== null ) {
47
- $ readsLines [] = "Index1Cycles, {$ this ->index1Cycles }" ;
48
- }
46
+
47
+ $ readsLines [] = "Index1Cycles, {$ this ->index1Cycles }" ;
48
+
49
49
if ($ this ->index2Cycles !== null ) {
50
50
$ readsLines [] = "Index2Cycles, {$ this ->index2Cycles }" ;
51
51
}
0 commit comments