public function __construct(InterfaceC $interface, Constant $constant, $declaringInterface = null) { $this->interface = $interface; $this->constant = $constant; $this->name = $constant->getName(); if ($interface->getName() === $declaringInterface) { $declaringInterface = null; } $this->declaringInterface = $declaringInterface; }
public function __construct(InterfaceC $interface, Method $method, $declaringInterface = null) { $this->interface = $interface; $this->method = $method; $this->name = strtolower($method->getName()); if ($interface->getName() === $declaringInterface) { $declaringInterface = null; } $this->declaringInterface = $declaringInterface; }
private function inferTypesForInterface(InterfaceC $interface) { $this->parser->setCurrentClassName($interface->getName()); $this->parser->setImportedNamespaces($interface->getImportedNamespaces()); foreach ($interface->getConstants() as $constant) { $this->inferTypesForClassConstant($constant->getConstant()); } foreach ($interface->getMethods() as $method) { // We do not pass the container here as it does not make sense to // check for @inheritdoc on interfaces (methods cannot be overridden). $this->inferTypesForMethodOrFunction($method->getMethod()); } }