| @@ 1201-1213 (lines=13) @@ | ||
| 1198 | $code = (string) $rule['ref']; |
|
| 1199 | ||
| 1200 | // Custom severity. |
|
| 1201 | if (isset($rule->severity) === true |
|
| 1202 | && $this->_shouldProcessElement($rule->severity) === true |
|
| 1203 | ) { |
|
| 1204 | if (isset($this->ruleset[$code]) === false) { |
|
| 1205 | $this->ruleset[$code] = array(); |
|
| 1206 | } |
|
| 1207 | ||
| 1208 | $this->ruleset[$code]['severity'] = (int) $rule->severity; |
|
| 1209 | if (PHP_CODESNIFFER_VERBOSITY > 1) { |
|
| 1210 | echo str_repeat("\t", $depth); |
|
| 1211 | echo "\t\t=> severity set to ".(int) $rule->severity.PHP_EOL; |
|
| 1212 | } |
|
| 1213 | } |
|
| 1214 | ||
| 1215 | // Custom message type. |
|
| 1216 | if (isset($rule->type) === true |
|
| @@ 1216-1228 (lines=13) @@ | ||
| 1213 | } |
|
| 1214 | ||
| 1215 | // Custom message type. |
|
| 1216 | if (isset($rule->type) === true |
|
| 1217 | && $this->_shouldProcessElement($rule->type) === true |
|
| 1218 | ) { |
|
| 1219 | if (isset($this->ruleset[$code]) === false) { |
|
| 1220 | $this->ruleset[$code] = array(); |
|
| 1221 | } |
|
| 1222 | ||
| 1223 | $this->ruleset[$code]['type'] = (string) $rule->type; |
|
| 1224 | if (PHP_CODESNIFFER_VERBOSITY > 1) { |
|
| 1225 | echo str_repeat("\t", $depth); |
|
| 1226 | echo "\t\t=> message type set to ".(string) $rule->type.PHP_EOL; |
|
| 1227 | } |
|
| 1228 | } |
|
| 1229 | ||
| 1230 | // Custom message. |
|
| 1231 | if (isset($rule->message) === true |
|
| @@ 1231-1243 (lines=13) @@ | ||
| 1228 | } |
|
| 1229 | ||
| 1230 | // Custom message. |
|
| 1231 | if (isset($rule->message) === true |
|
| 1232 | && $this->_shouldProcessElement($rule->message) === true |
|
| 1233 | ) { |
|
| 1234 | if (isset($this->ruleset[$code]) === false) { |
|
| 1235 | $this->ruleset[$code] = array(); |
|
| 1236 | } |
|
| 1237 | ||
| 1238 | $this->ruleset[$code]['message'] = (string) $rule->message; |
|
| 1239 | if (PHP_CODESNIFFER_VERBOSITY > 1) { |
|
| 1240 | echo str_repeat("\t", $depth); |
|
| 1241 | echo "\t\t=> message set to ".(string) $rule->message.PHP_EOL; |
|
| 1242 | } |
|
| 1243 | } |
|
| 1244 | ||
| 1245 | // Custom properties. |
|
| 1246 | if (isset($rule->properties) === true |
|