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

Breadcrumb

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

function DataProviderDeclarationRule::processNode

File

vendor/phpstan/phpstan-phpunit/src/Rules/PHPUnit/DataProviderDeclarationRule.php, line 54

Class

DataProviderDeclarationRule
@implements Rule<Node\Stmt\ClassMethod>

Namespace

PHPStan\Rules\PHPUnit

Code

public function processNode(Node $node, Scope $scope) : array {
    $classReflection = $scope->getClassReflection();
    if ($classReflection === null || !$classReflection->isSubclassOf(TestCase::class)) {
        return [];
    }
    $errors = [];
    foreach ($this->dataProviderHelper
        ->getDataProviderMethods($scope, $node, $classReflection) as $dataProviderValue => [
        $dataProviderClassReflection,
        $dataProviderMethodName,
        $lineNumber,
    ]) {
        $errors = array_merge($errors, $this->dataProviderHelper
            ->processDataProvider($dataProviderValue, $dataProviderClassReflection, $dataProviderMethodName, $lineNumber, $this->checkFunctionNameCase, $this->deprecationRulesInstalled));
    }
    return $errors;
}

API Navigation

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