railpage/railpagecore

View on GitHub
lib/Formatting/MakeClickable.php

Summary

Maintainability
C
1 day
Test Coverage

Function Process has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
Open

    public static function Process( $text ) {
        
        $timer = Debug::GetTimer(); 
        
        $r = '';
Severity: Minor
Found in lib/Formatting/MakeClickable.php - About 2 hrs to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Method Process has 41 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public static function Process( $text ) {
        
        $timer = Debug::GetTimer(); 
        
        $r = '';
Severity: Minor
Found in lib/Formatting/MakeClickable.php - About 1 hr to fix

    Function _split_str_by_whitespace has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
    Open

        public static function _split_str_by_whitespace( $string, $goal ) {
            $chunks = array();
        
            $string_nullspace = strtr( $string, "\r\n\t\v\f ", "\000\000\000\000\000\000" );
        
    Severity: Minor
    Found in lib/Formatting/MakeClickable.php - About 45 mins to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Function esc_url has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
    Open

        public static function esc_url( $url, $protocols = null, $_context = 'display' ) {
            $original_url = $url;
        
            if ( '' == $url )
                return $url;
    Severity: Minor
    Found in lib/Formatting/MakeClickable.php - About 45 mins to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    The method Process uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
    Open

                } else {
                    $ret = " $piece "; // Pad with whitespace to simplify the regexes
        
                    $url_clickable = '~
                        ([\\s(<.,;:!?])                                        # 1: Leading whitespace, or punctuation
    Severity: Minor
    Found in lib/Formatting/MakeClickable.php by phpmd

    ElseExpression

    Since: 1.4.0

    An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

    Example

    class Foo
    {
        public function bar($flag)
        {
            if ($flag) {
                // one branch
            } else {
                // another branch
            }
        }
    }

    Source https://phpmd.org/rules/cleancode.html#elseexpression

    The method _make_url_clickable_cb uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
    Open

            } else {
                $suffix = $matches[3];
            }
    Severity: Minor
    Found in lib/Formatting/MakeClickable.php by phpmd

    ElseExpression

    Since: 1.4.0

    An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

    Example

    class Foo
    {
        public function bar($flag)
        {
            if ($flag) {
                // one branch
            } else {
                // another branch
            }
        }
    }

    Source https://phpmd.org/rules/cleancode.html#elseexpression

    The method esc_url uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
    Open

            } else {
                /*
                if ( ! is_array( $protocols ) )
                    $protocols = wp_allowed_protocols();
                $good_protocol_url = wp_kses_bad_protocol( $url, $protocols );
    Severity: Minor
    Found in lib/Formatting/MakeClickable.php by phpmd

    ElseExpression

    Since: 1.4.0

    An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

    Example

    class Foo
    {
        public function bar($flag)
        {
            if ($flag) {
                // one branch
            } else {
                // another branch
            }
        }
    }

    Source https://phpmd.org/rules/cleancode.html#elseexpression

    The method Process uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
    Open

                        } else {
                            $r .= make_clickable( $chunk );
                        }
    Severity: Minor
    Found in lib/Formatting/MakeClickable.php by phpmd

    ElseExpression

    Since: 1.4.0

    An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

    Example

    class Foo
    {
        public function bar($flag)
        {
            if ($flag) {
                // one branch
            } else {
                // another branch
            }
        }
    }

    Source https://phpmd.org/rules/cleancode.html#elseexpression

    Avoid unused parameters such as '$protocols'.
    Open

        public static function esc_url( $url, $protocols = null, $_context = 'display' ) {
    Severity: Minor
    Found in lib/Formatting/MakeClickable.php by phpmd

    UnusedFormalParameter

    Since: 0.2

    Avoid passing parameters to methods or constructors and then not using those parameters.

    Example

    class Foo
    {
        private function bar($howdy)
        {
            // $howdy is not used
        }
    }

    Source https://phpmd.org/rules/unusedcode.html#unusedformalparameter

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

                if (function_exists("wp_kses_normalize_entities")) {
                    $url = wp_kses_normalize_entities( $url );
                }
    Severity: Minor
    Found in lib/Formatting/MakeClickable.php and 1 other location - About 45 mins to fix
    lib/ContentUtility.php on lines 271..273

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 26.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

                $string = substr( $string, $pos + 1 );
    Severity: Minor
    Found in lib/Formatting/MakeClickable.php and 1 other location - About 30 mins to fix
    lib/Formatting/MakeClickable.php on lines 222..222

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 21.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

                $string_nullspace = substr( $string_nullspace, $pos + 1 );
    Severity: Minor
    Found in lib/Formatting/MakeClickable.php and 1 other location - About 30 mins to fix
    lib/Formatting/MakeClickable.php on lines 221..221

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 21.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 9 locations. Consider refactoring.
    Open

            $strip = array('%0d', '%0a', '%0D', '%0A');
    Severity: Major
    Found in lib/Formatting/MakeClickable.php and 8 other locations - About 30 mins to fix
    lib/Downloads/Base.php on lines 141..146
    lib/Formatting/BbcodeUtility.php on lines 111..116
    lib/Forums/Forum.php on lines 294..299
    lib/Gallery/Utility/CreateSizes.php on lines 153..153
    lib/Images/Competition.php on lines 258..258
    lib/Images/Utility/Tagger.php on lines 131..136
    lib/Locos/Locomotive.php on lines 634..634
    lib/Locos/Locomotive.php on lines 646..646

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 20.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 3 locations. Consider refactoring.
    Open

                    $ret = preg_replace_callback( $url_clickable, 'self::_make_url_clickable_cb', $ret );
    Severity: Minor
    Found in lib/Formatting/MakeClickable.php and 2 other locations - About 30 mins to fix
    lib/Images/Utility/Tagger.php on lines 103..103
    lib/Images/Utility/Tagger.php on lines 104..104

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 20.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    The parameter $_context is not named in camelCase.
    Open

        public static function esc_url( $url, $protocols = null, $_context = 'display' ) {
            $original_url = $url;
        
            if ( '' == $url )
                return $url;
    Severity: Minor
    Found in lib/Formatting/MakeClickable.php by phpmd

    CamelCaseParameterName

    Since: 0.2

    It is considered best practice to use the camelCase notation to name parameters.

    Example

    class ClassName {
        public function doSomething($user_name) {
        }
    }

    Source

    Method name "_make_url_clickable_cb" should not be prefixed with an underscore to indicate visibility
    Open

        public static function _make_url_clickable_cb($matches) {

    Expected 0 spaces before closing bracket; 1 found
    Open

                if ( 10000 < strlen( $piece ) ) {

    Space found after opening bracket of FOREACH loop
    Open

            foreach ( $textarr as $piece ) {

    Method name "_make_web_ftp_clickable_cb" should not be prefixed with an underscore to indicate visibility
    Open

        public static function _make_web_ftp_clickable_cb($matches) {

    Space found before closing bracket of FOREACH loop
    Open

                    foreach ( self::_split_str_by_whitespace( $piece, 2100 ) as $chunk ) { // 2100: Extra room for scheme and leading and trailing paretheses

    Expected 0 spaces before closing bracket; 1 found
    Open

            if ( empty($url) )

    Expected 0 spaces between argument "$text" and closing bracket; 1 found
    Open

        public static function Process( $text ) {

    Expected 0 spaces between opening bracket and argument "$text"; 1 found
    Open

        public static function Process( $text ) {

    Space found after opening bracket of FOREACH loop
    Open

                    foreach ( self::_split_str_by_whitespace( $piece, 2100 ) as $chunk ) { // 2100: Extra room for scheme and leading and trailing paretheses

    Space found before closing bracket of FOREACH loop
    Open

            foreach ( $textarr as $piece ) {

    Expected 0 spaces before closing bracket; 1 found
    Open

            if ( empty($dest) )

    Expected 0 spaces before closing bracket; 1 found
    Open

                if ( empty( $piece ) || ( $piece[0] == '<' && ! preg_match('|^<\s*[\w]{1,20}+://|', $piece) ) ) {

    Expected 0 spaces before closing bracket; 1 found
    Open

                        if ( 2101 < strlen( $chunk ) ) {

    Expected 0 spaces before closing bracket; 1 found
    Open

                    foreach ( self::_split_str_by_whitespace( $piece, 2100 ) as $chunk ) { // 2100: Extra room for scheme and leading and trailing paretheses

    Expected 0 spaces before closing bracket; 1 found
    Open

            foreach ( $textarr as $piece ) {

    Expected 0 spaces before closing bracket; 1 found
    Open

            while ( substr_count( $url, '(' ) < substr_count( $url, ')' ) ) {

    Expected 0 spaces before closing bracket; 1 found
    Open

            if ( ')' == $matches[3] && strpos( $url, '(' ) ) {

    Expected 0 spaces before closing bracket; 1 found
    Open

            if ( in_array( substr($dest, -1), array('.', ',', ';', ':', ')') ) === true ) {

    Expected 0 spaces before closing bracket; 1 found
    Open

                if ( false === $pos ) {

    Method name "_make_email_clickable_cb" should not be prefixed with an underscore to indicate visibility
    Open

        public static function _make_email_clickable_cb($matches) {

    Spaces must be used for alignment; tabs are not allowed
    Open

                ! preg_match('/^[a-z0-9-]+?\.php/i', $url) )

    Spaces must be used for alignment; tabs are not allowed
    Open

            }

    Spaces must be used for alignment; tabs are not allowed
    Open

            if ( '' == $url )

    Spaces must be used for alignment; tabs are not allowed
    Open

        

    Spaces must be used for alignment; tabs are not allowed
    Open

            }

    Spaces must be used for alignment; tabs are not allowed
    Open

                $good_protocol_url = $url;

    Spaces must be used for alignment; tabs are not allowed
    Open

            if ( '/' === $url[0] ) {

    Spaces must be used for alignment; tabs are not allowed
    Open

                $subject = str_replace( $search, '', $subject, $count );

    Spaces must be used for alignment; tabs are not allowed
    Open

            $count = 1;

    Spaces must be used for alignment; tabs are not allowed
    Open

        

    Spaces must be used for alignment; tabs are not allowed
    Open

        

    Expected 0 spaces between argument "$_context" and closing bracket; 1 found
    Open

        public static function esc_url( $url, $protocols = null, $_context = 'display' ) {

    Spaces must be used for alignment; tabs are not allowed
    Open

                return $url;

    Spaces must be used for alignment; tabs are not allowed
    Open

            $url = self::_deep_replace($strip, $url);

    Spaces must be used for alignment; tabs are not allowed
    Open

         * @param string $url The URL to be cleaned.

    Spaces must be used for alignment; tabs are not allowed
    Open

         *        Defaults to 'http', 'https', 'ftp', 'ftps', 'mailto', 'news', 'irc', 'gopher', 'nntp', 'feed', 'telnet', 'mms', 'rtsp', 'svn' if not set.

    Spaces must be used for alignment; tabs are not allowed
    Open

                    $url = wp_kses_normalize_entities( $url );

    Spaces must be used for alignment; tabs are not allowed
    Open

                $url = str_replace( '&amp;', '&#038;', $url );

    Spaces must be used for alignment; tabs are not allowed
    Open

            if ( strpos($url, ':') === false && ! in_array( $url[0], array( '/', '#', '?' ) ) &&

    Spaces must be used for alignment; tabs are not allowed
    Open

         * @return string The string with the replaced svalues.

    Spaces must be used for alignment; tabs are not allowed
    Open

            }

    Spaces must be used for alignment; tabs are not allowed
    Open

        public static function _deep_replace( $search, $subject ) {

    Expected 0 spaces between argument "$goal" and closing bracket; 1 found
    Open

        public static function _split_str_by_whitespace( $string, $goal ) {

    Spaces must be used for alignment; tabs are not allowed
    Open

         * @param array $protocols Optional. An array of acceptable protocols.

    Spaces must be used for alignment; tabs are not allowed
    Open

         * @param string $_context Private. Use esc_url_raw() for database usage.

    Spaces must be used for alignment; tabs are not allowed
    Open

            $strip = array('%0d', '%0a', '%0D', '%0A');

    Spaces must be used for alignment; tabs are not allowed
    Open

            $url = str_replace(';//', '://', $url);

    Spaces must be used for alignment; tabs are not allowed
    Open

                if (function_exists("wp_kses_normalize_entities")) {

    Spaces must be used for alignment; tabs are not allowed
    Open

            return apply_filters('clean_url', $good_protocol_url, $original_url, $_context);

    Spaces must be used for alignment; tabs are not allowed
    Open

            while ( $count ) {

    Spaces must be used for alignment; tabs are not allowed
    Open

         *

    Spaces must be used for alignment; tabs are not allowed
    Open

        

    Expected 0 spaces before closing bracket; 1 found
    Open

            if ( 'display' == $_context ) {

    Spaces must be used for alignment; tabs are not allowed
    Open

                /*

    Spaces must be used for alignment; tabs are not allowed
    Open

        /**

    Expected 0 spaces between opening bracket and argument "$search"; 1 found
    Open

        public static function _deep_replace( $search, $subject ) {

    Spaces must be used for alignment; tabs are not allowed
    Open

            return $subject;

    Spaces must be used for alignment; tabs are not allowed
    Open

        public static function esc_url( $url, $protocols = null, $_context = 'display' ) {

    Expected 0 spaces before closing bracket; 1 found
    Open

            if ( '/' === $url[0] ) {

    Spaces must be used for alignment; tabs are not allowed
    Open

            } else {

    Spaces must be used for alignment; tabs are not allowed
    Open

         *

    Spaces must be used for alignment; tabs are not allowed
    Open

         *

    Spaces must be used for alignment; tabs are not allowed
    Open

            

    Expected 0 spaces before closing bracket; 1 found
    Open

            while ( $goal < strlen( $string_nullspace ) ) {

    Method name "_deep_replace" should not be prefixed with an underscore to indicate visibility
    Open

        public static function _deep_replace( $search, $subject ) {

    Spaces must be used for alignment; tabs are not allowed
    Open

         *        via $protocols or the common ones set in the function.

    Spaces must be used for alignment; tabs are not allowed
    Open

                $url = str_replace( "'", '&#039;', $url );

    Spaces must be used for alignment; tabs are not allowed
    Open

        

    Spaces must be used for alignment; tabs are not allowed
    Open

         */

    Spaces must be used for alignment; tabs are not allowed
    Open

                }

    Spaces must be used for alignment; tabs are not allowed
    Open

         */

    Spaces must be used for alignment; tabs are not allowed
    Open

         * @return string The cleaned $url after the 'clean_url' filter is applied.

    Spaces must be used for alignment; tabs are not allowed
    Open

                $url = 'http://' . $url;

    Spaces must be used for alignment; tabs are not allowed
    Open

        

    Spaces must be used for alignment; tabs are not allowed
    Open

         * @since 2.8.1

    Spaces must be used for alignment; tabs are not allowed
    Open

         * @param string|array $search The value being searched for, otherwise known as the needle. An array may be used to designate multiple needles.

    Method name "_split_str_by_whitespace" should not be prefixed with an underscore to indicate visibility
    Open

        public static function _split_str_by_whitespace( $string, $goal ) {

    Expected 0 spaces before closing bracket; 1 found
    Open

                    if ( false === $pos ) {

    Spaces must be used for alignment; tabs are not allowed
    Open

            // Replace ampersands and single quotes only when displaying.

    Expected 0 spaces before closing bracket; 1 found
    Open

            if ( $string ) {

    Spaces must be used for alignment; tabs are not allowed
    Open

            return $url;

    Spaces must be used for alignment; tabs are not allowed
    Open

         * @access private

    Expected 0 spaces before closing bracket; 1 found
    Open

            while ( $count ) {

    Expected 0 spaces between opening bracket and argument "$string"; 1 found
    Open

        public static function _split_str_by_whitespace( $string, $goal ) {

    Spaces must be used for alignment; tabs are not allowed
    Open

        }

    Expected 0 spaces between opening bracket and argument "$url"; 1 found
    Open

        public static function esc_url( $url, $protocols = null, $_context = 'display' ) {

    Spaces must be used for alignment; tabs are not allowed
    Open

            /* If the URL doesn't appear to contain a scheme, we

    Spaces must be used for alignment; tabs are not allowed
    Open

         *        Defaults to 'http', 'https', 'ftp', 'ftps', 'mailto', 'news', 'irc', 'gopher', 'nntp', 'feed', 'telnet', 'mms', 'rtsp', 'svn' if not set.

    Spaces must be used for alignment; tabs are not allowed
    Open

         * e.g. $subject = '%0%0%0DDD', $search ='%0D', $result ='' rather than the '%0%0DD' that

    Expected 0 spaces before closing bracket; 1 found
    Open

            if ( '' == $url )

    Spaces must be used for alignment; tabs are not allowed
    Open

         * str_replace would return

    Spaces must be used for alignment; tabs are not allowed
    Open

         *

    Spaces must be used for alignment; tabs are not allowed
    Open

            $original_url = $url;

    Spaces must be used for alignment; tabs are not allowed
    Open

         * @param string $subject The string being searched and replaced on, otherwise known as the haystack.

    Spaces must be used for alignment; tabs are not allowed
    Open

            $url = preg_replace('|[^a-z0-9-~+_.?#=!&;,/:%@$\|*\'()\\x80-\\xff]|i', '', $url);

    Spaces must be used for alignment; tabs are not allowed
    Open

        }

    Spaces must be used for alignment; tabs are not allowed
    Open

         * Perform a deep string replace operation to ensure the values in $search are no longer present

    Spaces must be used for alignment; tabs are not allowed
    Open

        

    Spaces must be used for alignment; tabs are not allowed
    Open

            if ( 'display' == $_context ) {

    Spaces must be used for alignment; tabs are not allowed
    Open

         * Repeats the replacement operation until it no longer replaces anything so as to remove "nested" values

    Spaces must be used for alignment; tabs are not allowed
    Open

        

    Expected 0 spaces between argument "$subject" and closing bracket; 1 found
    Open

        public static function _deep_replace( $search, $subject ) {

    Spaces must be used for alignment; tabs are not allowed
    Open

            $subject = (string) $subject;

    Spaces must be used to indent lines; tabs are not allowed
    Open

                        }

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    }

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    $ret = preg_replace_callback( $url_clickable, 'self::_make_url_clickable_cb', $ret );

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * make_clickable()}.

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * @return string HTML A element with URL address.

    Spaces must be used to indent lines; tabs are not allowed
    Open

                $ret = substr($dest, -1);

    Spaces must be used to indent lines; tabs are not allowed
    Open

         *

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    $url_clickable = '~

    Spaces must be used to indent lines; tabs are not allowed
    Open

                          // Tell PCRE to spend more time optimizing since, when used on a page load, it will probably be used several times.

    Spaces must be used to indent lines; tabs are not allowed
    Open

         *

    Spaces must be used to indent lines; tabs are not allowed
    Open

        

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * Callback to convert URL match to HTML A element.

    Spaces must be used to indent lines; tabs are not allowed
    Open

            $dest = self::esc_url($dest);

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    $pos = strpos( $string_nullspace, "\000", $goal + 1 );

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    foreach ( self::_split_str_by_whitespace( $piece, 2100 ) as $chunk ) { // 2100: Extra room for scheme and leading and trailing paretheses

    Spaces must be used to indent lines; tabs are not allowed
    Open

            }

    Spaces must be used to indent lines; tabs are not allowed
    Open

            $r = preg_replace( '#(<a( [^>]+?>|>))<a [^>]+?>([^>]+?)</a></a>#i', "$1$3</a>", $r );

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * @access private

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * @param array $matches Single Regex Match.

    Spaces must be used to indent lines; tabs are not allowed
    Open

                // If the trailing character is a closing parethesis, and the URL has an opening parenthesis in it, add the closing parenthesis to the URL.

    Spaces must be used to indent lines; tabs are not allowed
    Open

         *

    Spaces must be used to indent lines; tabs are not allowed
    Open

            $dest = $matches[2];

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * make_clickable()}.

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * within links.

    Spaces must be used to indent lines; tabs are not allowed
    Open

                        } else {

    Spaces must be used to indent lines; tabs are not allowed
    Open

        public static function _make_url_clickable_cb($matches) {

    Spaces must be used to indent lines; tabs are not allowed
    Open

            $url = $matches[2];

    Spaces must be used to indent lines; tabs are not allowed
    Open

                if ( empty( $piece ) || ( $piece[0] == '<' && ! preg_match('|^<\s*[\w]{1,20}+://|', $piece) ) ) {

    Spaces must be used to indent lines; tabs are not allowed
    Open

                return $matches[0];

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    // ... break it up

    Spaces must be used to indent lines; tabs are not allowed
    Open

            return $matches[1] . "<a href=\"$dest\" rel=\"nofollow\">$dest</a>$ret";

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    $ret = " $piece "; // Pad with whitespace to simplify the regexes

    Spaces must be used to indent lines; tabs are not allowed
    Open

        /**

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    $ret = preg_replace_callback( '#([\s>])((www|ftp)\.[\w\\x80-\\xff\#$%&~/.\-;:=,?@\[\]+]+)#is', 'self::_make_web_ftp_clickable_cb', $ret );

    Spaces must be used to indent lines; tabs are not allowed
    Open

         *

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * This function was backported from 2.5.0 to 2.3.2. Regex callback for {@link

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * @since 2.3.2

    Spaces must be used to indent lines; tabs are not allowed
    Open

         */

    Spaces must be used to indent lines; tabs are not allowed
    Open

        

    Spaces must be used to indent lines; tabs are not allowed
    Open

                // Then we can let the parenthesis balancer do its thing below.

    Spaces must be used to indent lines; tabs are not allowed
    Open

            // removed trailing [.,;:)] from URL

    Spaces must be used to indent lines; tabs are not allowed
    Open

                $dest = substr($dest, 0, strlen($dest)-1);

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * Chunks longer than the goal are guaranteed to not have any inner whitespace.

    Spaces must be used to indent lines; tabs are not allowed
    Open

         *

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * @param string $text Content to convert URIs.

    Spaces must be used to indent lines; tabs are not allowed
    Open

         */

    Spaces must be used to indent lines; tabs are not allowed
    Open

         *

    Spaces must be used to indent lines; tabs are not allowed
    Open

            if ( ')' == $matches[3] && strpos( $url, '(' ) ) {

    Spaces must be used to indent lines; tabs are not allowed
    Open

            }

    Spaces must be used to indent lines; tabs are not allowed
    Open

        

    Inline control structures are not allowed
    Open

            if ( empty($url) )

    Spaces must be used to indent lines; tabs are not allowed
    Open

         */

    Spaces must be used to indent lines; tabs are not allowed
    Open

            $email = $matches[2] . '@' . $matches[3];

    Spaces must be used to indent lines; tabs are not allowed
    Open

                // Long strings might contain expensive edge cases ...

    Spaces must be used to indent lines; tabs are not allowed
    Open

                        if ( 2101 < strlen( $chunk ) ) {

    Spaces must be used to indent lines; tabs are not allowed
    Open

                            $r .= $chunk; // Too big, no whitespace: bail.

    Spaces must be used to indent lines; tabs are not allowed
    Open

            // Include parentheses in the URL only if paired

    Spaces must be used to indent lines; tabs are not allowed
    Open

                $suffix = strrchr( $url, ')' ) . $suffix;

    Spaces must be used to indent lines; tabs are not allowed
    Open

        

    Spaces must be used to indent lines; tabs are not allowed
    Open

                return $matches[0];

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * This function was backported from 2.5.0 to 2.3.2. Regex callback for {@link

    Spaces must be used to indent lines; tabs are not allowed
    Open

            $textarr = preg_split( '/(<[^<>]+>)/', $text, -1, PREG_SPLIT_DELIM_CAPTURE ); // split out HTML tags

    Spaces must be used to indent lines; tabs are not allowed
    Open

        

    Spaces must be used to indent lines; tabs are not allowed
    Open

        

    Spaces must be used to indent lines; tabs are not allowed
    Open

                $suffix = '';

    Spaces must be used to indent lines; tabs are not allowed
    Open

        

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * @access private

    Spaces must be used to indent lines; tabs are not allowed
    Open

        

    Spaces must be used to indent lines; tabs are not allowed
    Open

        

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * @return string Content with converted URIs.

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    $ret = preg_replace_callback( '#([\s>])([.0-9a-z_+-]+)@(([0-9a-z-]+\.)+[0-9a-z]{2,})#i', 'self::_make_email_clickable_cb', $ret );

    Spaces must be used to indent lines; tabs are not allowed
    Open

                $suffix = $matches[3];

    Spaces must be used to indent lines; tabs are not allowed
    Open

            }

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * @since 0.71

    Spaces must be used to indent lines; tabs are not allowed
    Open

        public static function _make_web_ftp_clickable_cb($matches) {

    Spaces must be used to indent lines; tabs are not allowed
    Open

        

    Spaces must be used to indent lines; tabs are not allowed
    Open

        

    Spaces must be used to indent lines; tabs are not allowed
    Open

        

    Spaces must be used to indent lines; tabs are not allowed
    Open

                }

    Spaces must be used to indent lines; tabs are not allowed
    Open

            return $r;

    Spaces must be used to indent lines; tabs are not allowed
    Open

         *

    Spaces must be used to indent lines; tabs are not allowed
    Open

            $dest = 'http://' . $dest;

    Spaces must be used to indent lines; tabs are not allowed
    Open

            if ( empty($dest) )

    Spaces must be used to indent lines; tabs are not allowed
    Open

            if ( in_array( substr($dest, -1), array('.', ',', ';', ':', ')') ) === true ) {

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * <code>

    Spaces must be used to indent lines; tabs are not allowed
    Open

        /**

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * Convert plaintext URI to HTML links.

    Spaces must be used to indent lines; tabs are not allowed
    Open

         *

    Spaces must be used to indent lines; tabs are not allowed
    Open

         *

    Spaces must be used to indent lines; tabs are not allowed
    Open

        

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    $r .= $ret;

    Spaces must be used to indent lines; tabs are not allowed
    Open

                $url = substr( $url, 0, strrpos( $url, ')' ) );

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * @since 2.3.2

    Spaces must be used to indent lines; tabs are not allowed
    Open

        }

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * The length of each returned chunk is as close to the specified length goal as possible,

    Spaces must be used to indent lines; tabs are not allowed
    Open

            foreach ( $textarr as $piece ) {

    Spaces must be used to indent lines; tabs are not allowed
    Open

                }

    Spaces must be used to indent lines; tabs are not allowed
    Open

        }

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * This function was backported from 2.5.0 to 2.3.2. Regex callback for {@link

    Spaces must be used to indent lines; tabs are not allowed
    Open

         *

    Inline control structures are not allowed
    Open

            if ( empty($dest) )

    Spaces must be used to indent lines; tabs are not allowed
    Open

        

    Spaces must be used to indent lines; tabs are not allowed
    Open

        

    Spaces must be used to indent lines; tabs are not allowed
    Open

            }

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * Converts URI, www and ftp, and email addresses. Finishes by fixing links

    Spaces must be used to indent lines; tabs are not allowed
    Open

         *

    Spaces must be used to indent lines; tabs are not allowed
    Open

        }

    Spaces must be used to indent lines; tabs are not allowed
    Open

                if ( 10000 < strlen( $piece ) ) {

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * @return string HTML A element with URI address.

    Spaces must be used to indent lines; tabs are not allowed
    Open

        public static function Process( $text ) {

    Spaces must be used to indent lines; tabs are not allowed
    Open

        

    Spaces must be used to indent lines; tabs are not allowed
    Open

        }

    Spaces must be used to indent lines; tabs are not allowed
    Open

            return $matches[1] . "<a href=\"$url\" rel=\"nofollow\">$url</a>" . $suffix;

    Spaces must be used to indent lines; tabs are not allowed
    Open

                } else {

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * make_clickable()}.

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    $ret = substr( $ret, 1, -1 ); // Remove our whitespace padding.

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * @param array $matches Single Regex Match.

    Spaces must be used to indent lines; tabs are not allowed
    Open

                $url .= $matches[3];

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * @param array $matches Single Regex Match.

    Spaces must be used to indent lines; tabs are not allowed
    Open

            // Cleanup of accidental links within links

    Spaces must be used to indent lines; tabs are not allowed
    Open

        

    Spaces must be used to indent lines; tabs are not allowed
    Open

        /**

    Spaces must be used to indent lines; tabs are not allowed
    Open

            $r = '';

    Spaces must be used to indent lines; tabs are not allowed
    Open

        /**

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    $r .= $piece;

    Spaces must be used to indent lines; tabs are not allowed
    Open

            $url = self::esc_url($url);

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    continue;

    Spaces must be used to indent lines; tabs are not allowed
    Open

         *

    Spaces must be used to indent lines; tabs are not allowed
    Open

            $ret = '';

    Spaces must be used to indent lines; tabs are not allowed
    Open

                            $r .= make_clickable( $chunk );

    Spaces must be used to indent lines; tabs are not allowed
    Open

        

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * Callback to convert URI match to HTML A element.

    Spaces must be used to indent lines; tabs are not allowed
    Open

            } else {

    Spaces must be used to indent lines; tabs are not allowed
    Open

            while ( substr_count( $url, '(' ) < substr_count( $url, ')' ) ) {

    Spaces must be used to indent lines; tabs are not allowed
    Open

            if ( empty($url) )

    Spaces must be used to indent lines; tabs are not allowed
    Open

        

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * Callback to convert email address match to HTML A element.

    Spaces must be used to indent lines; tabs are not allowed
    Open

         *   1 => '1234 ',        //  5 characters: '1234 67890a' was too long

    Spaces must be used to indent lines; tabs are not allowed
    Open

                if ( false === $pos ) {

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * is applied to the returned cleaned URL.

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * @return string HTML A element with email address.

    Spaces must be used to indent lines; tabs are not allowed
    Open

        

    Spaces must be used to indent lines; tabs are not allowed
    Open

         *   7 => '1 3 5 7 9',    //  9 characters: End of $string

    Spaces must be used to indent lines; tabs are not allowed
    Open

        public static function _split_str_by_whitespace( $string, $goal ) {

    Spaces must be used to indent lines; tabs are not allowed
    Open

            return $chunks;

    Spaces must be used to indent lines; tabs are not allowed
    Open

                $string_nullspace = substr( $string_nullspace, $pos + 1 );

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * A number of characters are removed from the URL. If the URL is for displaying

    Spaces must be used to indent lines; tabs are not allowed
    Open

        

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * @uses wp_kses_bad_protocol() To only permit protocols in the URL set

    Spaces must be used to indent lines; tabs are not allowed
    Open

         *

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * @param int $goal The desired chunk length.

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    if ( false === $pos ) {

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    }

    Spaces must be used to indent lines; tabs are not allowed
    Open

         */

    Spaces must be used to indent lines; tabs are not allowed
    Open

            if ( $string ) {

    Spaces must be used to indent lines; tabs are not allowed
    Open

        public static function _make_email_clickable_cb($matches) {

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * (the default behaviour) ampersands are also replaced. The 'clean_url' filter

    Spaces must be used to indent lines; tabs are not allowed
    Open

            return $matches[1] . "<a href=\"mailto:$email\">$email</a>";

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * Breaks a string into chunks by splitting at whitespace characters.

    Spaces must be used to indent lines; tabs are not allowed
    Open

         *

    Spaces must be used to indent lines; tabs are not allowed
    Open

        

    Inline control structures are not allowed
    Open

            if ( strpos($url, ':') === false && ! in_array( $url[0], array( '/', '#', '?' ) ) &&

    Spaces must be used to indent lines; tabs are not allowed
    Open

         *

    Spaces must be used to indent lines; tabs are not allowed
    Open

         *   4 => '123456789 ',   // 10 characters: '123456789 1234567890a' was too long

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * @param string $string The string to split.

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * @since 2.8.0

    Spaces must be used to indent lines; tabs are not allowed
    Open

        

    Spaces must be used to indent lines; tabs are not allowed
    Open

         *

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * @since 3.4.0

    Spaces must be used to indent lines; tabs are not allowed
    Open

                        break;

    Spaces must be used to indent lines; tabs are not allowed
    Open

        /**

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * with the caveat that each chunk includes its trailing delimiter.

    Spaces must be used to indent lines; tabs are not allowed
    Open

         *

    Spaces must be used to indent lines; tabs are not allowed
    Open

                $string = substr( $string, $pos + 1 );

    Spaces must be used to indent lines; tabs are not allowed
    Open

         *   3 => '1234   890 ',  // 11 characters: Perfect split

    Spaces must be used to indent lines; tabs are not allowed
    Open

         *   5 => '1234567890a ', // 12 characters: Too long, but no inner whitespace on which to split

    Spaces must be used to indent lines; tabs are not allowed
    Open

        /**

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * @access private

    Spaces must be used to indent lines; tabs are not allowed
    Open

            $string_nullspace = strtr( $string, "\r\n\t\v\f ", "\000\000\000\000\000\000" );

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * Joining the returned chunks with empty delimiters reconstructs the input string losslessly.

    Spaces must be used to indent lines; tabs are not allowed
    Open

            while ( $goal < strlen( $string_nullspace ) ) {

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * Input string must have no null characters (or eventual transformations on output chunks must not care about null characters)

    Spaces must be used to indent lines; tabs are not allowed
    Open

         *   6 => '   45678   ',  // 11 characters: Perfect split

    Spaces must be used to indent lines; tabs are not allowed
    Open

        

    Spaces must be used to indent lines; tabs are not allowed
    Open

         *

    Spaces must be used to indent lines; tabs are not allowed
    Open

                $pos = strrpos( substr( $string_nullspace, 0, $goal + 1 ), "\000" );

    Spaces must be used to indent lines; tabs are not allowed
    Open

                $chunks[] = $string;

    Spaces must be used to indent lines; tabs are not allowed
    Open

         *        via $protocols or the common ones set in the function.

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * @since 2.3.2

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * _split_str_by_whitespace( "1234 67890 1234 67890a cd 1234   890 123456789 1234567890a    45678   1 3 5 7 90 ", 10 ) ==

    Spaces must be used to indent lines; tabs are not allowed
    Open

         *   2 => '67890a cd ',   // 10 characters: '67890a cd 1234' was too long

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * @access private

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * );

    Spaces must be used to indent lines; tabs are not allowed
    Open

        

    Spaces must be used to indent lines; tabs are not allowed
    Open

        }

    Spaces must be used to indent lines; tabs are not allowed
    Open

        

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * Checks and cleans a URL.

    Spaces must be used to indent lines; tabs are not allowed
    Open

         *   0 => '1234 67890 ',  // 11 characters: Perfect split

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * </code>

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * @return array Numeric array of chunks.

    Spaces must be used to indent lines; tabs are not allowed
    Open

        

    Spaces must be used to indent lines; tabs are not allowed
    Open

                }

    Spaces must be used to indent lines; tabs are not allowed
    Open

                $chunks[] = substr( $string, 0, $pos + 1 );

    Inline control structures are not allowed
    Open

            if ( '' == $url )

    Spaces must be used to indent lines; tabs are not allowed
    Open

            }

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * array (

    Spaces must be used to indent lines; tabs are not allowed
    Open

         *

    Spaces must be used to indent lines; tabs are not allowed
    Open

         */

    Spaces must be used to indent lines; tabs are not allowed
    Open

            }

    Spaces must be used to indent lines; tabs are not allowed
    Open

            $chunks = array();

    Expected 0 spaces after opening bracket; 1 found
    Open

                if ( 10000 < strlen( $piece ) ) {

    Expected 0 spaces after opening bracket; 1 found
    Open

            while ( substr_count( $url, '(' ) < substr_count( $url, ')' ) ) {

    Expected 0 spaces after opening bracket; 1 found
    Open

            if ( ')' == $matches[3] && strpos( $url, '(' ) ) {

    Expected 0 spaces after opening bracket; 1 found
    Open

            if ( in_array( substr($dest, -1), array('.', ',', ';', ':', ')') ) === true ) {

    Expected 0 spaces after opening bracket; 1 found
    Open

                if ( empty( $piece ) || ( $piece[0] == '<' && ! preg_match('|^<\s*[\w]{1,20}+://|', $piece) ) ) {

    Expected 0 spaces after opening bracket; 1 found
    Open

            foreach ( $textarr as $piece ) {

    Expected 0 spaces after opening bracket; 1 found
    Open

            if ( empty($dest) )

    Expected 0 spaces after opening bracket; 1 found
    Open

            if ( empty($url) )

    Expected 0 spaces after opening bracket; 1 found
    Open

                    foreach ( self::_split_str_by_whitespace( $piece, 2100 ) as $chunk ) { // 2100: Extra room for scheme and leading and trailing paretheses

    Expected 0 spaces after opening bracket; 1 found
    Open

                        if ( 2101 < strlen( $chunk ) ) {

    Expected 0 spaces after opening bracket; 1 found
    Open

                    if ( false === $pos ) {

    Expected 0 spaces after opening bracket; 1 found
    Open

            if ( $string ) {

    Expected 0 spaces after opening bracket; 1 found
    Open

                if ( false === $pos ) {

    Expected 0 spaces after opening bracket; 1 found
    Open

            if ( '' == $url )

    Expected 0 spaces after opening bracket; 1 found
    Open

            while ( $goal < strlen( $string_nullspace ) ) {

    Expected 0 spaces after opening bracket; 1 found
    Open

            while ( $count ) {

    Expected 0 spaces after opening bracket; 1 found
    Open

            if ( 'display' == $_context ) {

    Expected 0 spaces after opening bracket; 1 found
    Open

            if ( '/' === $url[0] ) {

    Expected 0 spaces after opening bracket; 1 found
    Open

            if ( strpos($url, ':') === false && ! in_array( $url[0], array( '/', '#', '?' ) ) &&

    There are no issues that match your filters.

    Category
    Status