PhpUnitDedicateAssertInternalTypeFixer
extends AbstractPhpUnitFixer
in package
implements
ConfigurableFixerInterface
uses
ConfigurableFixerTrait
FinalYes
Tags
Table of Contents
Interfaces
Properties
- $typeToDedicatedAssertMap : array<string, string>
Methods
- getDefinition() : FixerDefinitionInterface
- Returns the definition of the fixer.
- getPriority() : int
- Returns the priority of the fixer.
- isRisky() : bool
- Check if fixer is risky or not.
- applyPhpUnitClassFix() : void
- createConfigurationDefinition() : FixerConfigurationResolverInterface
Properties
$typeToDedicatedAssertMap
private
array<string, string>
$typeToDedicatedAssertMap
= ['array' => 'assertIsArray', 'boolean' => 'assertIsBool', 'bool' => 'assertIsBool', 'double' => 'assertIsFloat', 'float' => 'assertIsFloat', 'integer' => 'assertIsInt', 'int' => 'assertIsInt', 'null' => 'assertNull', 'numeric' => 'assertIsNumeric', 'object' => 'assertIsObject', 'real' => 'assertIsFloat', 'resource' => 'assertIsResource', 'string' => 'assertIsString', 'scalar' => 'assertIsScalar', 'callable' => 'assertIsCallable', 'iterable' => 'assertIsIterable']
Methods
getDefinition()
Returns the definition of the fixer.
public
getDefinition() : FixerDefinitionInterface
Return values
FixerDefinitionInterfacegetPriority()
Returns the priority of the fixer.
public
getPriority() : int
Must run after NoBinaryStringFixer, NoUselessConcatOperatorFixer, PhpUnitDedicateAssertFixer.
Return values
intisRisky()
Check if fixer is risky or not.
public
isRisky() : bool
Risky fixer could change code behavior!
Return values
boolapplyPhpUnitClassFix()
protected
applyPhpUnitClassFix(Tokens $tokens, int $startIndex, int $endIndex) : void
Parameters
- $tokens : Tokens
- $startIndex : int
- $endIndex : int
createConfigurationDefinition()
protected
createConfigurationDefinition() : FixerConfigurationResolverInterface