@@ -138,52 +138,13 @@ public function process(File $phpcsFile, $stackPtr)
138138        }
139139
140140        if  ($ spacing1 ) {
141-             // Set a context error code by checking if this is a class property, 
142-             // method, closure or class declaration. 
143-             $ ignoreTokens$ emptyTokens$ methodPrefixes
144-                 T_READONLY                => T_READONLY ,
145-                 // Ignore all the tokens in type hints. 
146-                 T_STRING                  => T_STRING ,
147-                 T_NULLABLE                => T_NULLABLE ,
148-                 T_BITWISE_AND             => T_BITWISE_AND ,
149-                 T_TYPE_INTERSECTION       => T_TYPE_INTERSECTION ,
150-                 T_TYPE_UNION              => T_TYPE_UNION ,
151-                 T_TYPE_OPEN_PARENTHESIS   => T_TYPE_OPEN_PARENTHESIS ,
152-                 T_TYPE_CLOSE_PARENTHESIS  => T_TYPE_CLOSE_PARENTHESIS ,
153-             ]);
154-             $ targetContext$ phpcsFilefindNext ($ ignoreTokens$ stackPtr1 ), null , true , null , true );
155-             $ errorCode'Incorrect ' ;
156-             if  (isset ($ tokens$ targetContext'code ' ]) === true ) {
157-                 switch  ($ tokens$ targetContext'code ' ]) {
158-                 case  T_VARIABLE :
159-                     $ errorCode'Property ' ;
160-                     break ;
161- 
162-                 case  T_FUNCTION :
163-                     $ errorCode'Method ' ;
164-                     break ;
165- 
166-                 case  T_CLOSURE :
167-                     $ errorCode'Closure ' ;
168-                     break ;
169- 
170-                 case  T_CLASS :
171-                     $ errorCode'Class ' ;
172-                     break ;
173- 
174-                 case  T_ANON_CLASS :
175-                     $ errorCode'AnonymousClass ' ;
176-                     break ;
177-                 }//end switch 
178-             }//end if 
179- 
180141            $ error'Scope keyword "%s" must be followed by a single space; found %s ' ;
181142            $ data
182143                $ tokens$ stackPtr'content ' ],
183144                $ spacing
184145            ];
185146
186-             $ fix$ phpcsFileaddFixableError ($ error$ stackPtr$ errorCode $ data
147+             $ fix$ phpcsFileaddFixableError ($ error$ stackPtr' Incorrect ' $ data
187148            if  ($ fixtrue ) {
188149                if  ($ spacing0 ) {
189150                    $ phpcsFilefixer ->addContent ($ stackPtr'  ' );
0 commit comments