public function removeTrait($trait) {
		if ($trait instanceof PhpTrait) {
			$name = $trait->getName();
		} else {
			$name = $trait;
		}

		$index = array_search($name, $this->traits);
		if ($index !== false) {
			unset($this->traits[$index]);

			if ($trait instanceof PhpTrait) {
				$qname = $trait->getQualifiedName();
				$this->removeUseStatement($qname);
			}
		}

		return $this;
	}
public function removeTrait($trait) {
		if ($trait instanceof PhpTrait) {
			$name = $trait->getName();
		} else {
			$name = $trait;
		}

		$index = array_search($name, $this->traits);
		if ($index !== false) {
			unset($this->traits[$index]);

			if ($trait instanceof PhpTrait) {
				$qname = $trait->getQualifiedName();
				$this->removeUseStatement($qname);
			}
		}

		return $this;
	}
public function removeTrait ( $ trait ) { if ( $ trait instanceof PhpTrait ) { $ name = $ trait -> getName ( ) ; } else { $ name = $ trait ; } $ index = array_search ( $ name , $ this -> traits ) ; if ( $ index !== false ) { unset ( $ this -> traits [ $ index ] ) ; if ( $ trait instanceof PhpTrait ) { $ qname = $ trait -> getQualifiedName ( ) ; $ this -> removeUseStatement ( $ qname ) ; } } return $ this ; }
Removes a trait.

If the trait is passed as PhpTrait object,
the trait is also removed from use statements.

@param PhpTrait|string $trait trait or qualified name
@return $this
Removes a trait .