Code Duplication    Length = 11-11 lines in 2 locations

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

@@ 198-208 (lines=11) @@
195
        $iBdCnt = floor(($iAll + $iBdCntW) / $iBlCnt) + ((($iAllW + $iBdCntW) % $iBlCnt) ? 1 : 0);
196
197
        // Calculate BD count
198
        if ($iBdCnt > $i1stBdL) {
199
            while (1) {
200
                ++$iBdExL;
201
                ++$iAllW;
202
                $iBdCntW = floor($iAllW / $iBlCnt) + (($iAllW % $iBlCnt) ? 1 : 0);
203
                $iBdCnt = floor(($iAllW + $iBdCntW) / $iBlCnt) + ((($iAllW + $iBdCntW) % $iBlCnt) ? 1 : 0);
204
                if ($iBdCnt <= ($iBdExL * $iBlCnt + $i1stBdL)) {
205
                    break;
206
                }
207
            }
208
        }
209
210
        // Save Header
211
        fwrite(
@@ 377-387 (lines=11) @@
374
        $iBdCntW = floor($iAllW / $iBbCnt) + (($iAllW % $iBbCnt) ? 1 : 0);
375
        $iBdCnt = floor(($iAll + $iBdCntW) / $iBbCnt) + ((($iAllW + $iBdCntW) % $iBbCnt) ? 1 : 0);
376
        // Calculate BD count
377
        if ($iBdCnt > $i1stBdL) {
378
            while (1) {
379
                ++$iBdExL;
380
                ++$iAllW;
381
                $iBdCntW = floor($iAllW / $iBbCnt) + (($iAllW % $iBbCnt) ? 1 : 0);
382
                $iBdCnt = floor(($iAllW + $iBdCntW) / $iBbCnt) + ((($iAllW + $iBdCntW) % $iBbCnt) ? 1 : 0);
383
                if ($iBdCnt <= ($iBdExL * $iBbCnt + $i1stBdL)) {
384
                    break;
385
                }
386
            }
387
        }
388
389
        // Making BD
390
        // Set for SBD