Code Duplication    Length = 9-10 lines in 3 locations

src/Anshar/Http/UriParts/Fragment.php 1 location

@@ 64-73 (lines=10) @@
61
    /**
62
     * Compiles a regexp pattern based on predefined patterns that define allowed characters for a fragment.
63
     */
64
    protected function compileValidPattern()
65
    {
66
        self::$valid_pattern = '/^([\/\?' .
67
            $this->unreserved_pattern .
68
            $this->sub_delims_pattern .
69
            $this->pchar_pattern .
70
            ']|' .                          //predefined patterns or percent-encoding
71
            $this->pct_encoded_pattern .
72
            ')*$/';
73
    }
74
75
    /**
76
     * Compiles an array of legal characters for a fragment based upon the RFC3986 specification:

src/Anshar/Http/UriParts/Query.php 1 location

@@ 64-73 (lines=10) @@
61
    /**
62
     * Compiles a regexp pattern based on predefined patterns that define allowed characters for a query.
63
     */
64
    protected function compileValidPattern()
65
    {
66
        self::$valid_pattern = '/^([\/\?' .
67
            $this->unreserved_pattern .
68
            $this->sub_delims_pattern .
69
            $this->pchar_pattern .
70
            ']|' .                          //predefined patterns or percent-encoding
71
            $this->pct_encoded_pattern .
72
            ')*$/';
73
    }
74
75
    /**
76
     * Compiles an array of legal characters for a query based upon the RFC3986 specification:

src/Anshar/Http/UriParts/UserInfo.php 1 location

@@ 41-49 (lines=9) @@
38
    /**
39
     * Compiles a regexp pattern based on predefined patterns that define allowed characters for user info
40
     */
41
    protected function compileValidPattern()
42
    {
43
        self::$valid_pattern = '/^([\/\?' .
44
            $this->unreserved_pattern .
45
            $this->sub_delims_pattern .
46
            ']|' .                          //predefined patterns or percent-encoding
47
            $this->pct_encoded_pattern .
48
            ')*$/';
49
    }
50
51
    /**
52
     * Compiles an array of legal characters for user info based upon the RFC3986 specification: