private static function buildFrame($string, Border $border)
    {
        $stringLength = Util::getVisibleStringLength($string);

        $line = Util::buildPatternLine($border->getLineCharacter(), $stringLength + 2);

        $firstLine = $border->getCrossCharacter() . $line . $border->getCrossCharacter();
        $mainLine  = $border->getColumnCharacter() . ' ' . $string . ' ' . $border->getColumnCharacter();
        $lastLine  = $firstLine;

        $result = $firstLine . PHP_EOL . $mainLine . PHP_EOL . $lastLine . PHP_EOL;

        return $result;
    }
private static function buildFrame($string, Border $border)
    {
        $stringLength = Util::getVisibleStringLength($string);

        $line = Util::buildPatternLine($border->getLineCharacter(), $stringLength + 2);

        $firstLine = $border->getCrossCharacter() . $line . $border->getCrossCharacter();
        $mainLine  = $border->getColumnCharacter() . ' ' . $string . ' ' . $border->getColumnCharacter();
        $lastLine  = $firstLine;

        $result = $firstLine . PHP_EOL . $mainLine . PHP_EOL . $lastLine . PHP_EOL;

        return $result;
    }
private static function buildFrame ( $ string , Border $ border ) { $ stringLength = Util :: getVisibleStringLength ( $ string ) ; $ line = Util :: buildPatternLine ( $ border -> getLineCharacter ( ) , $ stringLength + 2 ) ; $ firstLine = $ border -> getCrossCharacter ( ) . $ line . $ border -> getCrossCharacter ( ) ; $ mainLine = $ border -> getColumnCharacter ( ) . ' ' . $ string . ' ' . $ border -> getColumnCharacter ( ) ; $ lastLine = $ firstLine ; $ result = $ firstLine . PHP_EOL . $ mainLine . PHP_EOL . $ lastLine . PHP_EOL ; return $ result ; }
Frame with the given Border the given string

@param string $string
@param Border $border

@return string
Frame with the given Border the given string