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

Breadcrumb

  1. Drupal Core 11.1.x

FieldItemListMethodReflection.php

Namespace

mglaman\PHPStanDrupal\Reflection

File

vendor/mglaman/phpstan-drupal/src/Reflection/FieldItemListMethodReflection.php

View source
<?php

namespace mglaman\PHPStanDrupal\Reflection;

use PHPStan\Reflection\ClassMemberReflection;
use PHPStan\Reflection\ClassReflection;
use PHPStan\Reflection\MethodReflection;
use PHPStan\Reflection\TrivialParametersAcceptor;
use PHPStan\TrinaryLogic;
use PHPStan\Type\Type;

/**
 * Allows field access to common methods.
 */
class FieldItemListMethodReflection implements MethodReflection {
    private ClassReflection $declaringClass;
    private string $methodName;
    public function __construct(ClassReflection $declaringClass, string $methodName) {
        $this->declaringClass = $declaringClass;
        $this->methodName = $methodName;
    }
    public function getDeclaringClass() : ClassReflection {
        return $this->declaringClass;
    }
    public function isStatic() : bool {
        return false;
    }
    public function isPrivate() : bool {
        return false;
    }
    public function isPublic() : bool {
        return true;
    }
    public function getDocComment() : ?string {
        return null;
    }
    public function getName() : string {
        return $this->methodName;
    }
    public function getPrototype() : ClassMemberReflection {
        return $this;
    }
    
    /**
     * @return \PHPStan\Reflection\ParametersAcceptor[]
     */
    public function getVariants() : array {
        return [
            new TrivialParametersAcceptor(),
        ];
    }
    public function isDeprecated() : TrinaryLogic {
        return TrinaryLogic::createNo();
    }
    public function getDeprecatedDescription() : ?string {
        return '';
    }
    public function isFinal() : TrinaryLogic {
        return TrinaryLogic::createYes();
    }
    public function isInternal() : TrinaryLogic {
        return TrinaryLogic::createNo();
    }
    public function getThrowType() : ?Type {
        return null;
    }
    public function hasSideEffects() : TrinaryLogic {
        return TrinaryLogic::createNo();
    }

}

Classes

Title Deprecated Summary
FieldItemListMethodReflection Allows field access to common methods.
RSS feed
Powered by Drupal