Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. DataProviderHelper.php

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

DataProviderHelper

Namespace

PHPStan\Rules\PHPUnit

Code

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,
    ];
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal