classes/phing/Project.php
public function addTarget($targetName, $target)
    {
        if (isset($this->targets[$targetName])) {
            throw new BuildException("Duplicate target: $targetName");
        }
        $this->addOrReplaceTarget($targetName, $target);
    }
public function addTarget($targetName, $target)
    {
        if (isset($this->targets[$targetName])) {
            throw new BuildException("Duplicate target: $targetName");
        }
        $this->addOrReplaceTarget($targetName, $target);
    }
public function addTarget ( $ targetName , $ target ) { if ( isset ( $ this -> targets [ $ targetName ] ) ) { throw new BuildException ( "Duplicate target: $targetName" ) ; } $ this -> addOrReplaceTarget ( $ targetName , $ target ) ; }
Add a new target to the project

@param  string $targetName
@param  Target $target
@throws BuildException
Add a new target to the project