@@ -5,4 +5,5 @@ |
||
| 5 | 5 | use Dazzle\Filesystem\Node\NodeInterface; |
| 6 | 6 | |
| 7 | 7 | interface FilesystemInterface extends NodeInterface |
| 8 | -{} |
|
| 8 | +{ |
|
| 9 | +} |
|
@@ -34,13 +34,13 @@ discard block |
||
| 34 | 34 | public function stat($path) |
| 35 | 35 | { |
| 36 | 36 | return $this->invoker |
| 37 | - ->call('stat', [ $this->getPath($path) ]) |
|
| 37 | + ->call('stat', [$this->getPath($path)]) |
|
| 38 | 38 | ->then(function($stat) { |
| 39 | 39 | return $stat ? array_filter($stat, function($statKey) { |
| 40 | 40 | return !is_numeric($statKey); |
| 41 | 41 | }, ARRAY_FILTER_USE_KEY) : $stat; |
| 42 | 42 | }) |
| 43 | - ->then([ $this, 'handleStat' ]); |
|
| 43 | + ->then([$this, 'handleStat']); |
|
| 44 | 44 | } |
| 45 | 45 | |
| 46 | 46 | /** |
@@ -50,8 +50,8 @@ discard block |
||
| 50 | 50 | public function chmod($path, $mode) |
| 51 | 51 | { |
| 52 | 52 | return $this->invoker |
| 53 | - ->call('chmod', [ $this->getPath($path), decoct($mode) ]) |
|
| 54 | - ->then([ $this, 'handleChmod' ]); |
|
| 53 | + ->call('chmod', [$this->getPath($path), decoct($mode)]) |
|
| 54 | + ->then([$this, 'handleChmod']); |
|
| 55 | 55 | } |
| 56 | 56 | |
| 57 | 57 | /** |
@@ -61,8 +61,8 @@ discard block |
||
| 61 | 61 | public function chown($path, $uid = -1, $gid = -1) |
| 62 | 62 | { |
| 63 | 63 | return $this->invoker |
| 64 | - ->call('chown', [ $this->getPath($path), $uid, $gid ]) |
|
| 65 | - ->then([ $this, 'handleChown' ]); |
|
| 64 | + ->call('chown', [$this->getPath($path), $uid, $gid]) |
|
| 65 | + ->then([$this, 'handleChown']); |
|
| 66 | 66 | } |
| 67 | 67 | |
| 68 | 68 | /** |
@@ -47,8 +47,8 @@ discard block |
||
| 47 | 47 | public function stat($path) |
| 48 | 48 | { |
| 49 | 49 | return $this->invoker |
| 50 | - ->call('eio_lstat', [ $this->getPath($path) ]) |
|
| 51 | - ->then([ $this, 'handleStat' ]); |
|
| 50 | + ->call('eio_lstat', [$this->getPath($path)]) |
|
| 51 | + ->then([$this, 'handleStat']); |
|
| 52 | 52 | } |
| 53 | 53 | |
| 54 | 54 | /** |
@@ -58,8 +58,8 @@ discard block |
||
| 58 | 58 | public function chmod($path, $mode) |
| 59 | 59 | { |
| 60 | 60 | return $this->invoker |
| 61 | - ->call('eio_chmod', [ $this->getPath($path), decoct($mode) ]) |
|
| 62 | - ->then([ $this, 'handleChmod' ]); |
|
| 61 | + ->call('eio_chmod', [$this->getPath($path), decoct($mode)]) |
|
| 62 | + ->then([$this, 'handleChmod']); |
|
| 63 | 63 | } |
| 64 | 64 | |
| 65 | 65 | /** |
@@ -69,8 +69,8 @@ discard block |
||
| 69 | 69 | public function chown($path, $uid = -1, $gid = -1) |
| 70 | 70 | { |
| 71 | 71 | return $this->invoker |
| 72 | - ->call('eio_chown', [ $this->getPath($path), $uid, $gid ]) |
|
| 73 | - ->then([ $this, 'handleChown' ]); |
|
| 72 | + ->call('eio_chown', [$this->getPath($path), $uid, $gid]) |
|
| 73 | + ->then([$this, 'handleChown']); |
|
| 74 | 74 | } |
| 75 | 75 | |
| 76 | 76 | /** |
@@ -144,7 +144,7 @@ discard block |
||
| 144 | 144 | } |
| 145 | 145 | |
| 146 | 146 | $this->active = true; |
| 147 | - $this->loop->addReadStream($this->stream, [ $this, 'handleEvent' ]); |
|
| 147 | + $this->loop->addReadStream($this->stream, [$this, 'handleEvent']); |
|
| 148 | 148 | } |
| 149 | 149 | |
| 150 | 150 | protected function unregister() |
@@ -139,7 +139,8 @@ discard block |
||
| 139 | 139 | |
| 140 | 140 | protected function register() |
| 141 | 141 | { |
| 142 | - if ($this->active) { |
|
| 142 | + if ($this->active) |
|
| 143 | + { |
|
| 143 | 144 | return; |
| 144 | 145 | } |
| 145 | 146 | |
@@ -149,7 +150,8 @@ discard block |
||
| 149 | 150 | |
| 150 | 151 | protected function unregister() |
| 151 | 152 | { |
| 152 | - if (!$this->active) { |
|
| 153 | + if (!$this->active) |
|
| 154 | + { |
|
| 153 | 155 | return; |
| 154 | 156 | } |
| 155 | 157 | |