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

Breadcrumb

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

class NoMissingSpaceInMethodAnnotationRule

@implements Rule<InClassMethodNode>

Hierarchy

  • class \PHPStan\Rules\PHPUnit\NoMissingSpaceInMethodAnnotationRule implements \PHPStan\Rules\Rule

Expanded class hierarchy of NoMissingSpaceInMethodAnnotationRule

File

vendor/phpstan/phpstan-phpunit/src/Rules/PHPUnit/NoMissingSpaceInMethodAnnotationRule.php, line 14

Namespace

PHPStan\Rules\PHPUnit
View source
class NoMissingSpaceInMethodAnnotationRule implements Rule {
    
    /**
     * Covers helper.
     *
     * @var AnnotationHelper
     */
    private $annotationHelper;
    public function __construct(AnnotationHelper $annotationHelper) {
        $this->annotationHelper = $annotationHelper;
    }
    public function getNodeType() : string {
        return InClassMethodNode::class;
    }
    public function processNode(Node $node, Scope $scope) : array {
        $classReflection = $scope->getClassReflection();
        if ($classReflection === null || $classReflection->isSubclassOf(TestCase::class) === false) {
            return [];
        }
        $docComment = $node->getDocComment();
        if ($docComment === null) {
            return [];
        }
        return $this->annotationHelper
            ->processDocComment($docComment);
    }

}

Members

Title Sort descending Modifiers Object type Summary
NoMissingSpaceInMethodAnnotationRule::$annotationHelper private property * Covers helper.
*
*
NoMissingSpaceInMethodAnnotationRule::getNodeType public function
NoMissingSpaceInMethodAnnotationRule::processNode public function
NoMissingSpaceInMethodAnnotationRule::__construct public function
RSS feed
Powered by Drupal