| @@ 882-905 (lines=24) @@ | ||
| 879 | }//end if |
|
| 880 | ||
| 881 | // Ignore patterns. |
|
| 882 | foreach ($rule->{'exclude-pattern'} as $pattern) { |
|
| 883 | if ($this->shouldProcessElement($pattern) === false) { |
|
| 884 | continue; |
|
| 885 | } |
|
| 886 | ||
| 887 | if (isset($this->ignorePatterns[$code]) === false) { |
|
| 888 | $this->ignorePatterns[$code] = array(); |
|
| 889 | } |
|
| 890 | ||
| 891 | if (isset($pattern['type']) === false) { |
|
| 892 | $pattern['type'] = 'absolute'; |
|
| 893 | } |
|
| 894 | ||
| 895 | $this->ignorePatterns[$code][(string) $pattern] = (string) $pattern['type']; |
|
| 896 | if (PHP_CodeSniffer_VERBOSITY > 1) { |
|
| 897 | echo str_repeat("\t", $depth); |
|
| 898 | echo "\t\t=> added rule-specific ".(string) $pattern['type'].' ignore pattern'; |
|
| 899 | if ($code !== $ref) { |
|
| 900 | echo " for $code"; |
|
| 901 | } |
|
| 902 | ||
| 903 | echo ': '.(string) $pattern.PHP_EOL; |
|
| 904 | } |
|
| 905 | }//end foreach |
|
| 906 | ||
| 907 | // Include patterns. |
|
| 908 | foreach ($rule->{'include-pattern'} as $pattern) { |
|
| @@ 908-931 (lines=24) @@ | ||
| 905 | }//end foreach |
|
| 906 | ||
| 907 | // Include patterns. |
|
| 908 | foreach ($rule->{'include-pattern'} as $pattern) { |
|
| 909 | if ($this->shouldProcessElement($pattern) === false) { |
|
| 910 | continue; |
|
| 911 | } |
|
| 912 | ||
| 913 | if (isset($this->includePatterns[$code]) === false) { |
|
| 914 | $this->includePatterns[$code] = array(); |
|
| 915 | } |
|
| 916 | ||
| 917 | if (isset($pattern['type']) === false) { |
|
| 918 | $pattern['type'] = 'absolute'; |
|
| 919 | } |
|
| 920 | ||
| 921 | $this->includePatterns[$code][(string) $pattern] = (string) $pattern['type']; |
|
| 922 | if (PHP_CodeSniffer_VERBOSITY > 1) { |
|
| 923 | echo str_repeat("\t", $depth); |
|
| 924 | echo "\t\t=> added rule-specific ".(string) $pattern['type'].' include pattern'; |
|
| 925 | if ($code !== $ref) { |
|
| 926 | echo " for $code"; |
|
| 927 | } |
|
| 928 | ||
| 929 | echo ': '.(string) $pattern.PHP_EOL; |
|
| 930 | } |
|
| 931 | }//end foreach |
|
| 932 | }//end foreach |
|
| 933 | ||
| 934 | }//end processRule() |
|