opt
/
cpanel
/
ea-wappspector
/
vendor
/
slevomat
/
coding-standard
/
SlevomatCodingStandard
/
Sniffs
/
Namespaces
➕ New
📤 Upload
✎ Editing:
DisallowGroupUseSniff.php
← Back
<?php declare(strict_types = 1); namespace SlevomatCodingStandard\Sniffs\Namespaces; use PHP_CodeSniffer\Files\File; use PHP_CodeSniffer\Sniffs\Sniff; use const T_OPEN_USE_GROUP; class DisallowGroupUseSniff implements Sniff { public const CODE_DISALLOWED_GROUP_USE = 'DisallowedGroupUse'; /** * @return array<int, (int|string)> */ public function register(): array { return [ T_OPEN_USE_GROUP, ]; } /** * @phpcsSuppress SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingNativeTypeHint * @param int $usePointer */ public function process(File $phpcsFile, $usePointer): void { $phpcsFile->addError( 'Group use declaration is disallowed, use single use for every import.', $usePointer, self::CODE_DISALLOWED_GROUP_USE, ); } }
💾 Save Changes
Cancel
📤 Upload File
×
Select File
Upload
Cancel
➕ Create New
×
Type
📄 File
📁 Folder
Name
Create
Cancel
✎ Rename Item
×
Current Name
New Name
Rename
Cancel
🔐 Change Permissions
×
Target File
Permission (e.g., 0755, 0644)
0755
0644
0777
Apply
Cancel