| @@ 758-775 (lines=18) @@ | ||
| 755 | ||
| 756 | foreach ($todo as $code) { |
|
| 757 | // Custom severity. |
|
| 758 | if (isset($rule->severity) === true |
|
| 759 | && $this->shouldProcessElement($rule->severity) === true |
|
| 760 | ) { |
|
| 761 | if (isset($this->ruleset[$code]) === false) { |
|
| 762 | $this->ruleset[$code] = array(); |
|
| 763 | } |
|
| 764 | ||
| 765 | $this->ruleset[$code]['severity'] = (int) $rule->severity; |
|
| 766 | if (PHP_CodeSniffer_VERBOSITY > 1) { |
|
| 767 | echo str_repeat("\t", $depth); |
|
| 768 | echo "\t\t=> severity set to ".(int) $rule->severity; |
|
| 769 | if ($code !== $ref) { |
|
| 770 | echo " for $code"; |
|
| 771 | } |
|
| 772 | ||
| 773 | echo PHP_EOL; |
|
| 774 | } |
|
| 775 | } |
|
| 776 | ||
| 777 | // Custom message type. |
|
| 778 | if (isset($rule->type) === true |
|
| @@ 803-820 (lines=18) @@ | ||
| 800 | }//end if |
|
| 801 | ||
| 802 | // Custom message. |
|
| 803 | if (isset($rule->message) === true |
|
| 804 | && $this->shouldProcessElement($rule->message) === true |
|
| 805 | ) { |
|
| 806 | if (isset($this->ruleset[$code]) === false) { |
|
| 807 | $this->ruleset[$code] = array(); |
|
| 808 | } |
|
| 809 | ||
| 810 | $this->ruleset[$code]['message'] = (string) $rule->message; |
|
| 811 | if (PHP_CodeSniffer_VERBOSITY > 1) { |
|
| 812 | echo str_repeat("\t", $depth); |
|
| 813 | echo "\t\t=> message set to ".(string) $rule->message; |
|
| 814 | if ($code !== $ref) { |
|
| 815 | echo " for $code"; |
|
| 816 | } |
|
| 817 | ||
| 818 | echo PHP_EOL; |
|
| 819 | } |
|
| 820 | } |
|
| 821 | ||
| 822 | // Custom properties. |
|
| 823 | if (isset($rule->properties) === true |
|