- UnusedPrivateField
- UnusedLocalVariable
- UnusedPrivateMethod
- UnusedFormalParameter
- ShortVariable
- LongVariable
- ShortMethodName
- ConstructorWithNameAsEnclosingClass
- ConstantNamingConventions
- BooleanGetMethodName
- VariableNamingConventions
- MethodNamingConventions
- ClassNamingConventions
- AbstractNaming
- AvoidFieldNameMatchingTypeName
- AvoidFieldNameMatchingMethodName
- NoPackage
- MisleadingVariableName
- ExitExpression
- EvalExpression
- GotoStatement
- NumberOfChildren
- DepthOfInheritance
- CouplingBetweenObjects
- DevelopmentCodeFragment
- Superglobals
- CamelCaseClassName
- CamelCasePropertyName
- CamelCaseMethodName
- CamelCaseParameterName
- CamelCaseVariableName
- CyclomaticComplexity
- NPathComplexity
- ExcessiveMethodLength
- ExcessiveClassLength
- ExcessiveParameterList
- ExcessivePublicCount
- TooManyFields
- NcssMethodCount
- NcssTypeCount
- NcssConstructorCount
- TooManyMethods
- TooManyPublicMethods
- ExcessiveClassComplexity
- BooleanArgumentFlag
- ElseExpression
- StaticAccess
- BooleanGetMethodName
- ConstantNamingConventions
- ConstructorWithNameAsEnclosingClass
- CouplingBetweenObjects
- CyclomaticComplexity
- DepthOfInheritance
- EvalExpression
- ExcessiveClassComplexity
- ExcessiveClassLength
- ExcessiveMethodLength
- ExcessiveParameterList
- ExcessivePublicCount
- GotoStatement
- LongVariable
- NPathComplexity
- NumberOfChildren
- ShortMethodName
- ShortVariable
- TooManyFields
- TooManyMethods
- UnusedLocalVariable
- UnusedPrivateMethod
<?php
namespace Tests;
/**
* Suppress PHPMD Warnings for Camel Case Method Name for whole Class
*
* @SuppressWarnings(PHPMD.CamelCaseMethodName)
*/
Class UserTest
{
public function it_can_use_snake_case(): bool
{
return true;
}
/**
* Suppress Specific PHPMD Warnings for one Method in Class
*
* @SuppressWarnings(PHPMD.BooleanGetMethodName)
* @SuppressWarnings(PHPMD.ShortMethodName)
*
* @return bool
*/
public function on(): bool
{
return $this->active;
}
}