Code Duplication    Length = 10-11 lines in 2 locations

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

@@ 2011-2020 (lines=10) @@
2008
        $align = explode(',', $conf['align']);
2009
        $align[0] = strtolower(substr(trim($align[0]), 0, 1));
2010
        $align[1] = strtolower(substr(trim($align[1]), 0, 1));
2011
        switch ($align[0]) {
2012
            case 'r':
2013
                $result[0] = $w - $result[2];
2014
                break;
2015
            case 'c':
2016
                $result[0] = round(($w - $result[2]) / 2);
2017
                break;
2018
            default:
2019
                $result[0] = 0;
2020
        }
2021
        switch ($align[1]) {
2022
            case 'b':
2023
                // y pos
@@ 2021-2031 (lines=11) @@
2018
            default:
2019
                $result[0] = 0;
2020
        }
2021
        switch ($align[1]) {
2022
            case 'b':
2023
                // y pos
2024
                $result[1] = $h - $result[3];
2025
                break;
2026
            case 'c':
2027
                $result[1] = round(($h - $result[3]) / 2);
2028
                break;
2029
            default:
2030
                $result[1] = 0;
2031
        }
2032
        $result = $this->applyOffset($result, GeneralUtility::intExplode(',', $conf['offset']));
2033
        $result = $this->applyOffset($result, $workArea);
2034
        return $result;