Code Duplication    Length = 11-11 lines in 2 locations

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

@@ 218-228 (lines=11) @@
215
        $iBdCnt = floor(($iAll + $iBdCntW) / $iBlCnt) + ((($iAllW + $iBdCntW) % $iBlCnt) ? 1 : 0);
216
217
        // Calculate BD count
218
        if ($iBdCnt > $i1stBdL) {
219
            while (1) {
220
                ++$iBdExL;
221
                ++$iAllW;
222
                $iBdCntW = floor($iAllW / $iBlCnt) + (($iAllW % $iBlCnt) ? 1 : 0);
223
                $iBdCnt = floor(($iAllW + $iBdCntW) / $iBlCnt) + ((($iAllW + $iBdCntW) % $iBlCnt) ? 1 : 0);
224
                if ($iBdCnt <= ($iBdExL * $iBlCnt + $i1stBdL)) {
225
                    break;
226
                }
227
            }
228
        }
229
230
        // Save Header
231
        fwrite(
@@ 397-407 (lines=11) @@
394
        $iBdCntW = floor($iAllW / $iBbCnt) + (($iAllW % $iBbCnt) ? 1 : 0);
395
        $iBdCnt = floor(($iAll + $iBdCntW) / $iBbCnt) + ((($iAllW + $iBdCntW) % $iBbCnt) ? 1 : 0);
396
        // Calculate BD count
397
        if ($iBdCnt > $i1stBdL) {
398
            while (1) {
399
                ++$iBdExL;
400
                ++$iAllW;
401
                $iBdCntW = floor($iAllW / $iBbCnt) + (($iAllW % $iBbCnt) ? 1 : 0);
402
                $iBdCnt = floor(($iAllW + $iBdCntW) / $iBbCnt) + ((($iAllW + $iBdCntW) % $iBbCnt) ? 1 : 0);
403
                if ($iBdCnt <= ($iBdExL * $iBbCnt + $i1stBdL)) {
404
                    break;
405
                }
406
            }
407
        }
408
409
        // Making BD
410
        // Set for SBD