| Conditions | 1 |
| Paths | 1 |
| Total Lines | 14 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 10 | public function __invoke(FileContentsRequest $request) |
||
| 11 | { |
||
| 12 | $file = $request->get('file'); |
||
| 13 | |||
| 14 | abort_unless($file, Response::HTTP_UNPROCESSABLE_ENTITY); |
||
| 15 | |||
| 16 | $filePath = base_path($file); |
||
| 17 | |||
| 18 | $this->ensureFileExistInProject($filePath); |
||
| 19 | |||
| 20 | file_put_contents($filePath, $request->get('value')); |
||
| 21 | |||
| 22 | return ['saved' => true]; |
||
| 23 | } |
||
| 24 | } |
||
| 25 |