function DataProviderHelper::parseDataProviderAttribute
*
Return value
array<string, array{(ClassReflection|null), string, int}>|null
1 call to DataProviderHelper::parseDataProviderAttribute()
- DataProviderHelper::getDataProviderMethods in vendor/
phpstan/ phpstan-phpunit/ src/ Rules/ PHPUnit/ DataProviderHelper.php - *
File
-
vendor/
phpstan/ phpstan-phpunit/ src/ Rules/ PHPUnit/ DataProviderHelper.php, line 271
Class
Namespace
PHPStan\Rules\PHPUnitCode
private function parseDataProviderAttribute(Attribute $attribute, ClassReflection $classReflection) : ?array {
if (count($attribute->args) !== 1) {
return null;
}
$methodNameArg = $attribute->args[0]->value;
if (!$methodNameArg instanceof String_) {
return null;
}
return [
$methodNameArg->value => [
$classReflection,
$methodNameArg->value,
$attribute->getLine(),
],
];
}