Code Coverage |
||||||||||
Classes and Traits |
Functions and Methods |
Lines |
||||||||
Total | |
0.00% |
0 / 1 |
|
50.00% |
1 / 2 |
CRAP | |
75.00% |
3 / 4 |
ServerUnboxedExecutor | |
0.00% |
0 / 1 |
|
50.00% |
1 / 2 |
2.06 | |
75.00% |
3 / 4 |
__construct | |
100.00% |
1 / 1 |
1 | |
100.00% |
3 / 3 |
|||
getTempDirManager | |
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 1 |
<?php | |
namespace Shellbox\Command; | |
use Shellbox\TempDirManager; | |
/** | |
* Typically UnboxedExecutor rarely needs a TempDirManager, and so it is | |
* lazy-initialised to avoid the need for secure random numbers in the usual | |
* case. This ServerUnboxedExecutor instead takes a TempDirManager injected | |
* into its constructor, which is convenient for the Server since it has already | |
* initialised such an object. | |
*/ | |
class ServerUnboxedExecutor extends UnboxedExecutor { | |
/** @var TempDirManager */ | |
private $tempDirManager; | |
/** | |
* @param TempDirManager $tempDirManager | |
*/ | |
public function __construct( TempDirManager $tempDirManager ) { | |
parent::__construct(); | |
$this->tempDirManager = $tempDirManager; | |
} | |
protected function getTempDirManager() { | |
return $this->tempDirManager; | |
} | |
} |