public static function fromFile(string $filename): PhpTrait {
		$trait = new PhpTrait();
		$parser = new FileParser($filename);
		$parser->addVisitor(new TraitParserVisitor($trait));
		$parser->addVisitor(new MethodParserVisitor($trait));
		$parser->addVisitor(new ConstantParserVisitor($trait));
		$parser->addVisitor(new PropertyParserVisitor($trait));
		$parser->parse();

		return $trait;
	}
public static function fromFile(string $filename): PhpTrait {
		$trait = new PhpTrait();
		$parser = new FileParser($filename);
		$parser->addVisitor(new TraitParserVisitor($trait));
		$parser->addVisitor(new MethodParserVisitor($trait));
		$parser->addVisitor(new ConstantParserVisitor($trait));
		$parser->addVisitor(new PropertyParserVisitor($trait));
		$parser->parse();

		return $trait;
	}
public static function fromFile ( string $ filename ) : PhpTrait { $ trait = new PhpTrait ( ) ; $ parser = new FileParser ( $ filename ) ; $ parser -> addVisitor ( new TraitParserVisitor ( $ trait ) ) ; $ parser -> addVisitor ( new MethodParserVisitor ( $ trait ) ) ; $ parser -> addVisitor ( new ConstantParserVisitor ( $ trait ) ) ; $ parser -> addVisitor ( new PropertyParserVisitor ( $ trait ) ) ; $ parser -> parse ( ) ; return $ trait ; }
Creates a PHP trait from a file

@param string $filename
@return PhpTrait
Creates a PHP trait from a file