Code Coverage
 
Classes and Traits
Functions and Methods
Lines
Total
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
2 / 2
CRAP
100.00% covered (success)
100.00%
6 / 6
OutputGlobToFile
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
2 / 2
2
100.00% covered (success)
100.00%
6 / 6
 __construct
100.00% covered (success)
100.00%
1 / 1
1
100.00% covered (success)
100.00%
3 / 3
 getInstance
100.00% covered (success)
100.00%
1 / 1
1
100.00% covered (success)
100.00%
3 / 3
<?php
namespace Shellbox\Command;
/**
 * An output glob for files that are written to a local directory
 *
 * @internal
 */
class OutputGlobToFile extends OutputGlob {
    /** @var string */
    private $destDir;
    /**
     * @param string $prefix
     * @param string $extension
     * @param string $destDir
     */
    public function __construct( $prefix, $extension, $destDir ) {
        parent::__construct( $prefix, $extension );
        $this->destDir = $destDir;
    }
    public function getInstance( $boxedName ) {
        $instance = new OutputFileToFile( $this->destDir . '/' . basename( $boxedName ) );
        $this->files[$boxedName] = $instance;
        return $instance;
    }
}