src/Converter/Converter.php
protected function correct($content)
    {
        $corrections = $this->corrections;
        if (!empty($corrections)) {
            foreach ($corrections as $pattern => $replacement) {
                $reg_count = 0;

                /**
                 * @var $content
                 * reassign $content to corrected $content as long as corrections
                 * rules array loop
                 */
                $content = preg_replace('/' .
                    $pattern .
                    '/us', $replacement, $content, -1, $reg_count);
            }
        }
        return $content;
    }
protected function correct($content)
    {
        $corrections = $this->corrections;
        if (!empty($corrections)) {
            foreach ($corrections as $pattern => $replacement) {
                $reg_count = 0;

                /**
                 * @var $content
                 * reassign $content to corrected $content as long as corrections
                 * rules array loop
                 */
                $content = preg_replace('/' .
                    $pattern .
                    '/us', $replacement, $content, -1, $reg_count);
            }
        }
        return $content;
    }
protected function correct ( $ content ) { $ corrections = $ this -> corrections ; if ( ! empty ( $ corrections ) ) { foreach ( $ corrections as $ pattern => $ replacement ) { $ reg_count = 0 ; /**
                 * @var $content
                 * reassign $content to corrected $content as long as corrections
                 * rules array loop
                 */ $ content = preg_replace ( '/' . $ pattern . '/us' , $ replacement , $ content , - 1 , $ reg_count ) ; } } return $ content ; }
Correct any ordering or encoding error using regular expression
@param  string $content Content of text to correct
@return string          Corrected text
Correct any ordering or encoding error using regular expression