public function hasTarget(Target $target): bool
    {
        foreach ($this->_allOfType($target->type()) as $t) {
            if ($target->equals($t)) {
                return true;
            }
        }
        return false;
    }
public function hasTarget(Target $target): bool
    {
        foreach ($this->_allOfType($target->type()) as $t) {
            if ($target->equals($t)) {
                return true;
            }
        }
        return false;
    }
public function hasTarget ( Target $ target ) : bool { foreach ( $ this -> _allOfType ( $ target -> type ( ) ) as $ t ) { if ( $ target -> equals ( $ t ) ) { return true ; } } return false ; }
Check whether given target is present.

@param Target $target
@return boolean
Check whether given target is present .