Documentation

DisallowMixedGroupUseSniff
in package
implements Sniff

FinalYes

Disallow group use statements which combine imports for namespace/OO, functions and/or constants in one statement.

Note: the fixer will use a semi-standardized format for group use statements. If there are more specific requirements for the formatting of group use statements, the ruleset configurator should ensure that additional sniffs are included in the ruleset to enforce the required format.

Tags
since
1.1.0

Table of Contents

Interfaces

Sniff

Constants

METRIC_NAME  = 'Import use statement type'
Name of the "Use import source" metric.

Methods

process()  : void
Processes this test, when one of its tokens is encountered.
register()  : array<string|int, int|string>
Returns an array of tokens this test wants to listen for.

Constants

METRIC_NAME

Name of the "Use import source" metric.

public string METRIC_NAME = 'Import use statement type'
Tags
since
1.1.0

Methods

process()

Processes this test, when one of its tokens is encountered.

public process(File $phpcsFile, int $stackPtr) : void
Parameters
$phpcsFile : File

The file being scanned.

$stackPtr : int

The position of the current token in the stack passed in $tokens.

Tags
since
1.1.0

register()

Returns an array of tokens this test wants to listen for.

public register() : array<string|int, int|string>
Tags
since
1.1.0
Return values
array<string|int, int|string>

        
On this page

Search results