private function getSurroundingText(array $charArray, int $position) : string
    {
        if (count($charArray) <= 3) {
            return implode('', $charArray);
        }

        if ($position <= 3) {
            return implode('', array_slice($charArray, 0, 4));
        }

        return implode('', array_slice($charArray, $position - 3, 4));
    }
private function getSurroundingText(array $charArray, int $position) : string
    {
        if (count($charArray) <= 3) {
            return implode('', $charArray);
        }

        if ($position <= 3) {
            return implode('', array_slice($charArray, 0, 4));
        }

        return implode('', array_slice($charArray, $position - 3, 4));
    }
private function getSurroundingText ( array $ charArray , int $ position ) : string { if ( count ( $ charArray ) <= 3 ) { return implode ( '' , $ charArray ) ; } if ( $ position <= 3 ) { return implode ( '' , array_slice ( $ charArray , 0 , 4 ) ) ; } return implode ( '' , array_slice ( $ charArray , $ position - 3 , 4 ) ) ; }
Gets text around a certain position for use in exceptions

@param array $charArray The char array
@param int $position The numerical position to grab text around
@return string The surrounding text
Gets text around a certain position for use in exceptions