| @@ 213-222 (lines=10) @@ | ||
| 210 | /** |
|
| 211 | * @return $this |
|
| 212 | */ |
|
| 213 | protected function clear(): Builder |
|
| 214 | { |
|
| 215 | File::put($this->app->configPath('app.php'), static::$config); |
|
| 216 | ||
| 217 | File::delete($this->app->basePath($this->stub)); |
|
| 218 | ||
| 219 | static::$config = null; |
|
| 220 | ||
| 221 | return $this; |
|
| 222 | } |
|
| 223 | ||
| 224 | /** |
|
| 225 | * Makes sure that the `clear` is performed even |
|
| @@ 230-236 (lines=7) @@ | ||
| 227 | * |
|
| 228 | * @return void |
|
| 229 | */ |
|
| 230 | public function __destruct() |
|
| 231 | { |
|
| 232 | if (static::$config !== null) { |
|
| 233 | File::put($this->app->configPath('app.php'), static::$config); |
|
| 234 | File::delete($this->app->basePath($this->stub)); |
|
| 235 | } |
|
| 236 | } |
|
| 237 | } |
|
| 238 | ||