@@ -81,14 +81,15 @@ public function process(File $phpcsFile, $stackPtr)
8181
8282 $ ptrPadding = \max (3 , \strlen ($ last ));
8383 $ linePadding = \strlen ($ tokens [$ last ]['line ' ]);
84+ $ sep = ' | ' ;
8485
8586 echo \PHP_EOL ;
8687 echo \str_pad ('Ptr ' , $ ptrPadding , ' ' , \STR_PAD_BOTH ),
87- ' :: ' , \str_pad ('Ln ' , ($ linePadding + 1 ), ' ' , \STR_PAD_BOTH ),
88- ' :: ' , \str_pad ('Col ' , 4 , ' ' , \STR_PAD_BOTH ),
89- ' :: ' , 'Cond ' ,
90- ' :: ' , \str_pad ('Token Type ' , 26 ), // Longest token type name is 26 chars.
91- ' :: [len]: Content ' , \PHP_EOL ;
88+ $ sep , \str_pad ('Ln ' , ($ linePadding + 1 ), ' ' , \STR_PAD_BOTH ),
89+ $ sep , \str_pad ('Col ' , 4 , ' ' , \STR_PAD_BOTH ),
90+ $ sep , 'Cond ' ,
91+ $ sep , \str_pad ('Token Type ' , 26 ), // Longest token type name is 26 chars.
92+ $ sep , ' [len]: Content ' , \PHP_EOL ;
9293
9394 echo \str_repeat ('- ' , ($ ptrPadding + $ linePadding + 35 + 16 + 18 )), \PHP_EOL ;
9495
@@ -111,18 +112,18 @@ public function process(File $phpcsFile, $stackPtr)
111112 $ content = \str_replace ("\t" , '\t ' , $ content );
112113 }
113114 if (isset ($ token ['orig_content ' ])) {
114- $ content .= ' :: Orig: ' . \str_replace ("\t" , '\t ' , $ token ['orig_content ' ]);
115+ $ content .= $ sep . ' Orig: ' . \str_replace ("\t" , '\t ' , $ token ['orig_content ' ]);
115116 }
116117 }
117118
118119 $ conditionCount = \count ($ token ['conditions ' ]);
119120
120121 echo \str_pad ($ ptr , $ ptrPadding , ' ' , \STR_PAD_LEFT ),
121- ' :: L ' , \str_pad ($ token ['line ' ], $ linePadding , '0 ' , \STR_PAD_LEFT ),
122- ' :: C ' , \str_pad ($ token ['column ' ], 3 , ' ' , \STR_PAD_LEFT ),
123- ' :: CC ' , \str_pad ($ conditionCount , 2 , ' ' , \STR_PAD_LEFT ),
124- ' :: ' , \str_pad ($ token ['type ' ], 26 ), // Longest token type name is 26 chars.
125- ' :: [ ' , $ token ['length ' ], ']: ' , $ content , \PHP_EOL ;
122+ $ sep , ' L ' , \str_pad ($ token ['line ' ], $ linePadding , '0 ' , \STR_PAD_LEFT ),
123+ $ sep , ' C ' , \str_pad ($ token ['column ' ], 3 , ' ' , \STR_PAD_LEFT ),
124+ $ sep , ' CC ' , \str_pad ($ conditionCount , 2 , ' ' , \STR_PAD_LEFT ),
125+ $ sep , \str_pad ($ token ['type ' ], 26 ), // Longest token type name is 26 chars.
126+ $ sep , ' [ ' , $ token ['length ' ], ']: ' , $ content , \PHP_EOL ;
126127 }
127128
128129 // Only do this once per file.
0 commit comments