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 5
5
* Output is designed to be displayed in a terminal and is wrapped to 100 characters.
6
6
*
7
7
* @author Greg Sherwood <gsherwood@squiz.net>
8
+ * @author Juliette Reinders Folmer <phpcs_nospam@adviesenzo.nl>
8
9
* @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600)
10
+ * @copyright 2024 PHPCSStandards and contributors
9
11
* @license https://github.com/PHPCSStandards/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
10
12
*/
11
13
@@ -52,13 +54,15 @@ public function processSniff(DOMNode $doc)
52
54
*/
53
55
protected function printTitle (DOMNode $ doc )
54
56
{
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 );
57
61
58
62
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 ));
62
66
echo PHP_EOL .PHP_EOL ;
63
67
64
68
}//end printTitle()
You can’t perform that action at this time.
0 commit comments