- $this->assertLessThanOrEqual(
- // FILE_IGNORE_NEW_LINES drops the \n at the EOL, so max length is 80 not 81.
- 80,
- mb_strlen( $line ),
- "$type file '$fileName' line $num, is longer than 80 chars:\n\t'$line'"
- );
+
+ // FILE_IGNORE_NEW_LINES drops the \n at the EOL, so max length is 80 not 81.
+ $max_length = 80;
+
+ $length = mb_strlen( $line );
+ if ( $length <= $max_length ) {
+ continue;
+ }
+ $errors[] = "line $num: length $length > $max_length:\n$line";