public function testSetGetIsShared() { $this->descriptor->setIsShared(false); $this->assertFalse($this->descriptor->isShared()); $this->descriptor->setIsShared(true); $this->assertTrue($this->descriptor->isShared()); }
/** * @return boolean */ public function isShared() { if (!$this->isShared) { return false; } if ($this->parent && !$this->parent->isShared()) { return false; } if (is_array($this->interfaces)) { /** @var $interface Descriptor */ foreach ($this->interfaces as $interface) { if ($interface->getName() === $this->getName()) { continue; } if (!$interface->isShared()) { return false; } } } return true; }