File tree Expand file tree Collapse file tree 3 files changed +11
-7
lines changed Expand file tree Collapse file tree 3 files changed +11
-7
lines changed Original file line number Diff line number Diff line change 99
1010namespace PhpCollective \Sniffs \Classes \Psr4 ;
1111
12+ use const PATHINFO_DIRNAME ;
13+ use const PATHINFO_FILENAME ;
14+
1215class AutoloadabilityInspector
1316{
1417 /**
@@ -110,10 +113,10 @@ protected function guessRelativeFileName(
110113 protected function guessRelativeClassName (string $ relativeFileName ): string
111114 {
112115 $ basename = basename ($ relativeFileName );
113- $ filename = pathinfo ($ relativeFileName , \ PATHINFO_FILENAME );
116+ $ filename = pathinfo ($ relativeFileName , PATHINFO_FILENAME );
114117 $ dirname = $ basename === $ relativeFileName ?
115118 '' :
116- pathinfo ($ relativeFileName , \ PATHINFO_DIRNAME ) . '/ ' ;
119+ pathinfo ($ relativeFileName , PATHINFO_DIRNAME ) . '/ ' ;
117120
118121 return str_replace ('/ ' , '\\' , $ dirname ) . $ filename ;
119122 }
Original file line number Diff line number Diff line change 1919use RuntimeException ;
2020use SlevomatCodingStandard \Helpers \ClassHelper ;
2121use SlevomatCodingStandard \Helpers \TokenHelper ;
22+ use const T_CLASS ;
23+ use const T_INTERFACE ;
24+ use const T_STRING ;
25+ use const T_TRAIT ;
2226
2327class Psr4Sniff implements Sniff
2428{
@@ -63,7 +67,7 @@ class Psr4Sniff implements Sniff
6367 */
6468 public function register (): array
6569 {
66- return [\ T_CLASS , \ T_INTERFACE , \ T_TRAIT ];
70+ return [T_CLASS , T_INTERFACE , T_TRAIT ];
6771 }
6872
6973 /**
@@ -162,6 +166,6 @@ protected function getClassNameDeclarationPosition(
162166 File $ phpcsFile ,
163167 int $ typePointer ,
164168 ): ?int {
165- return TokenHelper::findNext ($ phpcsFile , \ T_STRING , $ typePointer + 1 );
169+ return TokenHelper::findNext ($ phpcsFile , T_STRING , $ typePointer + 1 );
166170 }
167171}
Original file line number Diff line number Diff line change 3030 <property name =" allowFallbackGlobalConstants" value =" true" />
3131 </properties >
3232 </rule >
33- <rule ref =" SlevomatCodingStandard.Namespaces.ReferenceUsedNamesOnly.ReferenceViaFullyQualifiedName" >
34- <severity >0</severity >
35- </rule >
3633
3734 <rule ref =" SlevomatCodingStandard.Namespaces.UseFromSameNamespace" />
3835 <rule ref =" SlevomatCodingStandard.Namespaces.UseDoesNotStartWithBackslash" />
You can’t perform that action at this time.
0 commit comments