Code Duplication    Length = 11-11 lines in 2 locations

src/PhpSpreadsheet/Shared/OLE/PPS/Root.php 2 locations

@@ 188-198 (lines=11) @@
185
        $iBdCnt = floor(($iAll + $iBdCntW) / $iBlCnt) + ((($iAllW + $iBdCntW) % $iBlCnt) ? 1 : 0);
186
187
        // Calculate BD count
188
        if ($iBdCnt > $i1stBdL) {
189
            while (1) {
190
                ++$iBdExL;
191
                ++$iAllW;
192
                $iBdCntW = floor($iAllW / $iBlCnt) + (($iAllW % $iBlCnt) ? 1 : 0);
193
                $iBdCnt = floor(($iAllW + $iBdCntW) / $iBlCnt) + ((($iAllW + $iBdCntW) % $iBlCnt) ? 1 : 0);
194
                if ($iBdCnt <= ($iBdExL * $iBlCnt + $i1stBdL)) {
195
                    break;
196
                }
197
            }
198
        }
199
200
        // Save Header
201
        fwrite(
@@ 367-377 (lines=11) @@
364
        $iBdCntW = floor($iAllW / $iBbCnt) + (($iAllW % $iBbCnt) ? 1 : 0);
365
        $iBdCnt = floor(($iAll + $iBdCntW) / $iBbCnt) + ((($iAllW + $iBdCntW) % $iBbCnt) ? 1 : 0);
366
        // Calculate BD count
367
        if ($iBdCnt > $i1stBdL) {
368
            while (1) {
369
                ++$iBdExL;
370
                ++$iAllW;
371
                $iBdCntW = floor($iAllW / $iBbCnt) + (($iAllW % $iBbCnt) ? 1 : 0);
372
                $iBdCnt = floor(($iAllW + $iBdCntW) / $iBbCnt) + ((($iAllW + $iBdCntW) % $iBbCnt) ? 1 : 0);
373
                if ($iBdCnt <= ($iBdExL * $iBbCnt + $i1stBdL)) {
374
                    break;
375
                }
376
            }
377
        }
378
379
        // Making BD
380
        // Set for SBD