📁 File Manager Pro
v10.0.2 | PHP: 8.1.34
Server: LiteSpeed
2026-06-29 21:05:24
📂
/
/
opt
/
cpanel
/
ea-wappspector
/
vendor
/
slevomat
/
coding-standard
/
SlevomatCodingStandard
/
Sniffs
/
Functions
✏️
Editing: DisallowArrowFunctionSniff.php
<?php declare(strict_types = 1); namespace SlevomatCodingStandard\Sniffs\Functions; use PHP_CodeSniffer\Files\File; use PHP_CodeSniffer\Sniffs\Sniff; use const T_FN; class DisallowArrowFunctionSniff implements Sniff { public const CODE_DISALLOWED_ARROW_FUNCTION = 'DisallowedArrowFunction'; /** * @return array<int, (int|string)> */ public function register(): array { return [ T_FN, ]; } /** * @phpcsSuppress SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingNativeTypeHint * @param int $arrowFunctionPointer */ public function process(File $phpcsFile, $arrowFunctionPointer): void { $phpcsFile->addError('Use of arrow function is disallowed.', $arrowFunctionPointer, self::CODE_DISALLOWED_ARROW_FUNCTION); } }
💾 Save Changes
❌ Cancel