Code Duplication    Length = 7-7 lines in 2 locations

typo3/sysext/core/Classes/Imaging/GraphicalFunctions.php 2 locations

@@ 902-908 (lines=7) @@
899
            do {
900
                // Determine bounding box.
901
                $bounds = $this->ImageTTFBBoxWrapper($conf['fontSize'], $conf['angle'], $conf['fontFile'], $conf['text'], $conf['splitRendering.']);
902
                if ($conf['angle'] < 0) {
903
                    $pixelWidth = abs($bounds[4] - $bounds[0]);
904
                } elseif ($conf['angle'] > 0) {
905
                    $pixelWidth = abs($bounds[2] - $bounds[6]);
906
                } else {
907
                    $pixelWidth = abs($bounds[4] - $bounds[6]);
908
                }
909
                // Size is fine, exit:
910
                if ($pixelWidth <= $maxWidth) {
911
                    break;
@@ 1266-1272 (lines=7) @@
1263
    protected function getRenderedTextWidth($text, $conf)
1264
    {
1265
        $bounds = $this->ImageTTFBBoxWrapper($conf['fontSize'], $conf['angle'], $conf['fontFile'], $text, $conf['splitRendering.']);
1266
        if ($conf['angle'] < 0) {
1267
            $pixelWidth = abs($bounds[4] - $bounds[0]);
1268
        } elseif ($conf['angle'] > 0) {
1269
            $pixelWidth = abs($bounds[2] - $bounds[6]);
1270
        } else {
1271
            $pixelWidth = abs($bounds[4] - $bounds[6]);
1272
        }
1273
        return $pixelWidth;
1274
    }
1275