public function setTarget(string $target): void
    {
        $path = realpath($target);
        if (false === $path) {
            if (@mkdir($target, 0755, true)) {
                $path = realpath($target);
            } else {
                throw new InvalidArgumentException(
                    'Target directory (' . $target . ') does not exist and could not be created'
                );
            }
        }

        if (!is_dir($path) || !is_writable($path)) {
            throw new InvalidArgumentException('Given target (' . $target . ') is not a writable directory');
        }

        $this->target = $path;
    }
public function setTarget(string $target): void
    {
        $path = realpath($target);
        if (false === $path) {
            if (@mkdir($target, 0755, true)) {
                $path = realpath($target);
            } else {
                throw new InvalidArgumentException(
                    'Target directory (' . $target . ') does not exist and could not be created'
                );
            }
        }

        if (!is_dir($path) || !is_writable($path)) {
            throw new InvalidArgumentException('Given target (' . $target . ') is not a writable directory');
        }

        $this->target = $path;
    }
public function setTarget ( string $ target ) : void { $ path = realpath ( $ target ) ; if ( false === $ path ) { if ( @ mkdir ( $ target , 0755 , true ) ) { $ path = realpath ( $ target ) ; } else { throw new InvalidArgumentException ( 'Target directory (' . $ target . ') does not exist and could not be created' ) ; } } if ( ! is_dir ( $ path ) || ! is_writable ( $ path ) ) { throw new InvalidArgumentException ( 'Given target (' . $ target . ') is not a writable directory' ) ; } $ this -> target = $ path ; }
Sets the target location where to output the artifacts.

@param string $target The target location where to output the artifacts.

@throws InvalidArgumentException if the target is not a valid writable directory.
Sets the target location where to output the artifacts .