File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change 55 * Output is designed to be displayed in a terminal and is wrapped to 100 characters.
66 *
77 * @author Greg Sherwood <gsherwood@squiz.net>
8+ * @author Juliette Reinders Folmer <phpcs_nospam@adviesenzo.nl>
89 * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600)
10+ * @copyright 2024 PHPCSStandards and contributors
911 * @license https://github.com/PHPCSStandards/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
1012 */
1113
@@ -52,13 +54,15 @@ public function processSniff(DOMNode $doc)
5254 */
5355 protected function printTitle (DOMNode $ doc )
5456 {
55- $ title = $ this ->getTitle ($ doc );
56- $ standard = $ this ->ruleset ->name ;
57+ $ title = $ this ->getTitle ($ doc );
58+ $ standard = $ this ->ruleset ->name ;
59+ $ displayTitle = "$ standard CODING STANDARD: $ title " ;
60+ $ titleLength = strlen ($ displayTitle );
5761
5862 echo PHP_EOL ;
59- echo str_repeat ('- ' , (strlen ( " $ standard CODING STANDARD: $ title " ) + 4 ));
60- echo strtoupper (PHP_EOL ."| $ standard CODING STANDARD: $ title | " .PHP_EOL );
61- echo str_repeat ('- ' , (strlen ( " $ standard CODING STANDARD: $ title " ) + 4 ));
63+ echo str_repeat ('- ' , ($ titleLength + 4 ));
64+ echo strtoupper (PHP_EOL ."| $ displayTitle | " .PHP_EOL );
65+ echo str_repeat ('- ' , ($ titleLength + 4 ));
6266 echo PHP_EOL .PHP_EOL ;
6367
6468 }//end printTitle()
You can’t perform that action at this time.
0 commit comments