protected function duplicateBorder(&$val)
    {
        // 1 value => L => RTB
        if (count($val) == 1) {
            $val[1] = $val[0];
            $val[2] = $val[0];
            $val[3] = $val[0];
        // 2 values => L => R & T => B
        } elseif (count($val) == 2) {
            $val[2] = $val[0];
            $val[3] = $val[1];
        // 3 values => T => B
        } elseif (count($val) == 3) {
            $val[3] = $val[1];
        }
    }