function DataProviderHelper::parseDataProviderAnnotationValue
*
Return value
array{ClassReflection|null, string}
1 call to DataProviderHelper::parseDataProviderAnnotationValue()
- DataProviderHelper::getDataProviderMethods in vendor/
phpstan/ phpstan-phpunit/ src/ Rules/ PHPUnit/ DataProviderHelper.php - *
File
-
vendor/
phpstan/ phpstan-phpunit/ src/ Rules/ PHPUnit/ DataProviderHelper.php, line 218
Class
Namespace
PHPStan\Rules\PHPUnitCode
private function parseDataProviderAnnotationValue(Scope $scope, string $dataProviderValue) : array {
$parts = explode('::', $dataProviderValue, 2);
if (count($parts) <= 1) {
return [
$scope->getClassReflection(),
$dataProviderValue,
];
}
if ($this->reflectionProvider
->hasClass($parts[0])) {
return [
$this->reflectionProvider
->getClass($parts[0]),
$parts[1],
];
}
return [
null,
$dataProviderValue,
];
}