| Total Complexity | 5 |
| Total Lines | 55 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 15 | class DestructibleString |
||
| 16 | { |
||
| 17 | /** |
||
| 18 | * @var string |
||
| 19 | */ |
||
| 20 | private $string; |
||
| 21 | |||
| 22 | /** |
||
| 23 | * @var callable |
||
| 24 | */ |
||
| 25 | private $callback; |
||
| 26 | |||
| 27 | /** |
||
| 28 | * @see LibFs::rmDir |
||
| 29 | * |
||
| 30 | * @param string $string |
||
| 31 | * |
||
| 32 | * @return DestructibleString |
||
| 33 | */ |
||
| 34 | 1 | public static function rmDir($string) |
|
| 39 | ); |
||
| 40 | } |
||
| 41 | |||
| 42 | 1 | public static function rm($string) |
|
| 43 | { |
||
| 44 | 1 | return new self( |
|
| 45 | 1 | $string, |
|
| 46 | 1 | 'Ktomk\Pipelines\LibFs::rm' |
|
| 47 | ); |
||
| 48 | } |
||
| 49 | |||
| 50 | /** |
||
| 51 | * DestructibleString constructor. |
||
| 52 | * |
||
| 53 | * @param string $string |
||
| 54 | * @param callable $callback |
||
| 55 | */ |
||
| 56 | 3 | public function __construct($string, $callback) |
|
| 57 | { |
||
| 58 | 3 | $this->string = $string; |
|
| 59 | 3 | $this->callback = $callback; |
|
| 60 | 3 | } |
|
| 61 | |||
| 62 | 3 | public function __destruct() |
|
| 65 | 3 | } |
|
| 66 | |||
| 67 | 4 | public function __toString() |
|
| 70 | } |
||
| 71 | } |
||
| 72 |