phpDocumentor\Descriptor\TraitDescriptor::getUsedTraits PHP Method

getUsedTraits() public method

Returned values may either be a string (when the Trait is not in this project) or a TraitDescriptor.
public getUsedTraits ( ) : phpDocumentor\Descriptor\Collection
return phpDocumentor\Descriptor\Collection
    public function getUsedTraits()
    {
        return $this->usedTraits;
    }

Usage Example

 /**
  * @covers phpDocumentor\Descriptor\TraitDescriptor::getUsedTraits
  * @covers phpDocumentor\Descriptor\TraitDescriptor::setUsedTraits
  */
 public function testSettingAndGettingUsedTraits()
 {
     $this->assertInstanceOf('phpDocumentor\\Descriptor\\Collection', $this->fixture->getUsedTraits());
     $usedTraitsCollection = new Collection();
     $this->fixture->setUsedTraits($usedTraitsCollection);
     $this->assertSame($usedTraitsCollection, $this->fixture->getUsedTraits());
 }