Conditions | 1 |
Paths | 1 |
Total Lines | 14 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
47 | public function open() |
||
48 | { |
||
49 | $this->opening = true; |
||
50 | $file = $this->filesystem->file($this->getRandomFilename()); |
||
51 | return $file->exists()->then(function () { |
||
52 | return $this->open(); |
||
53 | }, function () use ($file) { |
||
54 | return $file->create()->open('cw')->then(function ($stream) { |
||
55 | $this->open = true; |
||
56 | $this->opening = false; |
||
57 | $this->stream = $stream; |
||
58 | }); |
||
59 | }); |
||
60 | } |
||
61 | |||
87 |