PATH:
opt
/
cpanel
/
ea-wappspector
/
vendor
/
slevomat
/
coding-standard
/
SlevomatCodingStandard
/
Sniffs
/
Functions
<?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); } }
[-] ArrowFunctionDeclarationSniff.php
[edit]
[-] StrictCallSniff.php
[edit]
[-] UselessParameterDefaultValueSniff.php
[edit]
[-] RequireTrailingCommaInCallSniff.php
[edit]
[-] DisallowTrailingCommaInCallSniff.php
[edit]
[-] RequireMultiLineCallSniff.php
[edit]
[+]
..
[-] UnusedInheritedVariablePassedToClosureSniff.php
[edit]
[-] NamedArgumentSpacingSniff.php
[edit]
[-] RequireTrailingCommaInClosureUseSniff.php
[edit]
[-] DisallowTrailingCommaInDeclarationSniff.php
[edit]
[-] RequireArrowFunctionSniff.php
[edit]
[-] DisallowArrowFunctionSniff.php
[edit]
[-] DisallowTrailingCommaInClosureUseSniff.php
[edit]
[-] DisallowNamedArgumentsSniff.php
[edit]
[-] RequireTrailingCommaInDeclarationSniff.php
[edit]
[-] FunctionLengthSniff.php
[edit]
[-] RequireSingleLineCallSniff.php
[edit]
[-] UnusedParameterSniff.php
[edit]
[-] StaticClosureSniff.php
[edit]
[-] DisallowEmptyFunctionSniff.php
[edit]
[-] AbstractLineCall.php
[edit]