| @@ -44,7 +44,7 @@ | ||
| 44 | 44 | $resultFlags = 0; | 
| 45 | 45 | $start = 0; | 
| 46 | 46 | |
| 47 | - foreach ([ 'universe', 'group', 'user' ] as $scope) | |
| 47 | + foreach (['universe', 'group', 'user'] as $scope) | |
| 48 | 48 |          { | 
| 49 | 49 | $this->currentScope = $scope; | 
| 50 | 50 | $start -= 3; | 
| @@ -82,8 +82,8 @@ discard block | ||
| 82 | 82 | */ | 
| 83 | 83 | public function chmod($path, $mode) | 
| 84 | 84 |      { | 
| 85 | -        return $this->invoker->call('eio_chmod', [ $this->getPath($path), decoct($mode) ]) | |
| 86 | - ->then([ $this, 'handleChmod' ]); | |
| 85 | +        return $this->invoker->call('eio_chmod', [$this->getPath($path), decoct($mode)]) | |
| 86 | + ->then([$this, 'handleChmod']); | |
| 87 | 87 | } | 
| 88 | 88 | |
| 89 | 89 | /** | 
| @@ -92,8 +92,8 @@ discard block | ||
| 92 | 92 | */ | 
| 93 | 93 | public function chown($path, $uid = -1, $gid = -1) | 
| 94 | 94 |      { | 
| 95 | -        return $this->invoker->call('eio_chown', [ $this->getPath($path), $uid, $gid ]) | |
| 96 | - ->then([ $this, 'handleChown' ]); | |
| 95 | +        return $this->invoker->call('eio_chown', [$this->getPath($path), $uid, $gid]) | |
| 96 | + ->then([$this, 'handleChown']); | |
| 97 | 97 | } | 
| 98 | 98 | |
| 99 | 99 | /** | 
| @@ -115,7 +115,7 @@ discard block | ||
| 115 | 115 | */ | 
| 116 | 116 | public function link($srcPath, $dstPath) | 
| 117 | 117 |      { | 
| 118 | -        return $this->invoker->call('eio_link', [ $this->getPath($srcPath), $this->getPath($dstPath) ]); | |
| 118 | +        return $this->invoker->call('eio_link', [$this->getPath($srcPath), $this->getPath($dstPath)]); | |
| 119 | 119 | } | 
| 120 | 120 | |
| 121 | 121 | /** | 
| @@ -133,7 +133,7 @@ discard block | ||
| 133 | 133 | */ | 
| 134 | 134 | public function mkdir($path, $mode = 0755) | 
| 135 | 135 |      { | 
| 136 | -        return $this->invoker->call('eio_mkdir', [ $this->getPath($path), $this->flagPermission->resolve($mode) ]); | |
| 136 | +        return $this->invoker->call('eio_mkdir', [$this->getPath($path), $this->flagPermission->resolve($mode)]); | |
| 137 | 137 | } | 
| 138 | 138 | |
| 139 | 139 | /** | 
| @@ -151,7 +151,7 @@ discard block | ||
| 151 | 151 | */ | 
| 152 | 152 | public function readlink($path) | 
| 153 | 153 |      { | 
| 154 | -        return $this->invoker->call('eio_readlink', [ $this->getPath($path) ]); | |
| 154 | +        return $this->invoker->call('eio_readlink', [$this->getPath($path)]); | |
| 155 | 155 | } | 
| 156 | 156 | |
| 157 | 157 | /** | 
| @@ -160,7 +160,7 @@ discard block | ||
| 160 | 160 | */ | 
| 161 | 161 | public function realpath($path) | 
| 162 | 162 |      { | 
| 163 | -        return $this->invoker->call('eio_realpath', [ $this->getPath($path) ]); | |
| 163 | +        return $this->invoker->call('eio_realpath', [$this->getPath($path)]); | |
| 164 | 164 | } | 
| 165 | 165 | |
| 166 | 166 | /** | 
| @@ -169,7 +169,7 @@ discard block | ||
| 169 | 169 | */ | 
| 170 | 170 | public function rename($srcPath, $dstPath) | 
| 171 | 171 |      { | 
| 172 | -        return $this->invoker->call('eio_rename', [ $this->getPath($srcPath), $this->getPath($dstPath) ]); | |
| 172 | +        return $this->invoker->call('eio_rename', [$this->getPath($srcPath), $this->getPath($dstPath)]); | |
| 173 | 173 | } | 
| 174 | 174 | |
| 175 | 175 | /** | 
| @@ -178,7 +178,7 @@ discard block | ||
| 178 | 178 | */ | 
| 179 | 179 | public function rmdir($path) | 
| 180 | 180 |      { | 
| 181 | -        return $this->invoker->call('eio_rmdir', [ $this->getPath($path) ]); | |
| 181 | +        return $this->invoker->call('eio_rmdir', [$this->getPath($path)]); | |
| 182 | 182 | } | 
| 183 | 183 | |
| 184 | 184 | /** | 
| @@ -187,7 +187,7 @@ discard block | ||
| 187 | 187 | */ | 
| 188 | 188 | public function stat($path) | 
| 189 | 189 |      { | 
| 190 | -        return $this->invoker->call('eio_lstat', [ $this->getPath($path) ]) | |
| 190 | +        return $this->invoker->call('eio_lstat', [$this->getPath($path)]) | |
| 191 | 191 |              ->then(function($info) { | 
| 192 | 192 | if ($info) | 
| 193 | 193 |                  { | 
| @@ -205,7 +205,7 @@ discard block | ||
| 205 | 205 | */ | 
| 206 | 206 | public function symlink($srcPath, $dstPath) | 
| 207 | 207 |      { | 
| 208 | -        return $this->invoker->call('eio_symlink', [ $this->getPath($srcPath), $this->getPath($dstPath) ]); | |
| 208 | +        return $this->invoker->call('eio_symlink', [$this->getPath($srcPath), $this->getPath($dstPath)]); | |
| 209 | 209 | } | 
| 210 | 210 | |
| 211 | 211 | /** | 
| @@ -214,7 +214,7 @@ discard block | ||
| 214 | 214 | */ | 
| 215 | 215 | public function truncate($path, $len = 0) | 
| 216 | 216 |      { | 
| 217 | -        return $this->invoker->call('eio_truncate', [ $this->getPath($path), $len ]); | |
| 217 | +        return $this->invoker->call('eio_truncate', [$this->getPath($path), $len]); | |
| 218 | 218 | } | 
| 219 | 219 | |
| 220 | 220 | /** | 
| @@ -223,7 +223,7 @@ discard block | ||
| 223 | 223 | */ | 
| 224 | 224 | public function unlink($path) | 
| 225 | 225 |      { | 
| 226 | -        return $this->invoker->call('eio_unlink', [ $this->getPath($path) ]); | |
| 226 | +        return $this->invoker->call('eio_unlink', [$this->getPath($path)]); | |
| 227 | 227 | } | 
| 228 | 228 | |
| 229 | 229 | /** | 
| @@ -297,7 +297,7 @@ discard block | ||
| 297 | 297 | } | 
| 298 | 298 | |
| 299 | 299 | $this->active = true; | 
| 300 | - $this->loop->addReadStream($this->stream, [ $this, 'handleEvent' ]); | |
| 300 | + $this->loop->addReadStream($this->stream, [$this, 'handleEvent']); | |
| 301 | 301 | } | 
| 302 | 302 | |
| 303 | 303 | protected function unregister() | 
| @@ -64,7 +64,7 @@ discard block | ||
| 64 | 64 | */ | 
| 65 | 65 | public function chmod($path, $mode) | 
| 66 | 66 |      { | 
| 67 | -        return $this->invoker->call('chmod', [ $this->getPath($path), decoct($mode) ]); | |
| 67 | +        return $this->invoker->call('chmod', [$this->getPath($path), decoct($mode)]); | |
| 68 | 68 | } | 
| 69 | 69 | |
| 70 | 70 | /** | 
| @@ -73,7 +73,7 @@ discard block | ||
| 73 | 73 | */ | 
| 74 | 74 | public function chown($path, $uid = -1, $gid = -1) | 
| 75 | 75 |      { | 
| 76 | -        return $this->invoker->call('chown', [ $this->getPath($path), $uid, $gid ]); | |
| 76 | +        return $this->invoker->call('chown', [$this->getPath($path), $uid, $gid]); | |
| 77 | 77 | } | 
| 78 | 78 | |
| 79 | 79 | /** | 
| @@ -95,7 +95,7 @@ discard block | ||
| 95 | 95 | */ | 
| 96 | 96 | public function link($srcPath, $dstPath) | 
| 97 | 97 |      { | 
| 98 | -        return $this->invoker->call('link', [ $this->getPath($srcPath), $this->getPath($dstPath) ]); | |
| 98 | +        return $this->invoker->call('link', [$this->getPath($srcPath), $this->getPath($dstPath)]); | |
| 99 | 99 | } | 
| 100 | 100 | |
| 101 | 101 | /** | 
| @@ -113,7 +113,7 @@ discard block | ||
| 113 | 113 | */ | 
| 114 | 114 | public function mkdir($path, $mode = 0755) | 
| 115 | 115 |      { | 
| 116 | -        return $this->invoker->call('mkdir', [ $this->getPath($path), decoct($this->flagPermission->resolve($mode)) ]); | |
| 116 | +        return $this->invoker->call('mkdir', [$this->getPath($path), decoct($this->flagPermission->resolve($mode))]); | |
| 117 | 117 | } | 
| 118 | 118 | |
| 119 | 119 | /** | 
| @@ -131,7 +131,7 @@ discard block | ||
| 131 | 131 | */ | 
| 132 | 132 | public function readlink($path) | 
| 133 | 133 |      { | 
| 134 | -        return $this->invoker->call('readlink', [ $this->getPath($path) ]); | |
| 134 | +        return $this->invoker->call('readlink', [$this->getPath($path)]); | |
| 135 | 135 | } | 
| 136 | 136 | |
| 137 | 137 | /** | 
| @@ -140,7 +140,7 @@ discard block | ||
| 140 | 140 | */ | 
| 141 | 141 | public function realpath($path) | 
| 142 | 142 |      { | 
| 143 | -        return $this->invoker->call('realpath', [ $this->getPath($path) ]); | |
| 143 | +        return $this->invoker->call('realpath', [$this->getPath($path)]); | |
| 144 | 144 | } | 
| 145 | 145 | |
| 146 | 146 | /** | 
| @@ -149,7 +149,7 @@ discard block | ||
| 149 | 149 | */ | 
| 150 | 150 | public function rename($srcPath, $dstPath) | 
| 151 | 151 |      { | 
| 152 | -        return $this->invoker->call('rename', [ $this->getPath($srcPath), $this->getPath($dstPath) ]); | |
| 152 | +        return $this->invoker->call('rename', [$this->getPath($srcPath), $this->getPath($dstPath)]); | |
| 153 | 153 | } | 
| 154 | 154 | |
| 155 | 155 | /** | 
| @@ -158,7 +158,7 @@ discard block | ||
| 158 | 158 | */ | 
| 159 | 159 | public function rmdir($path) | 
| 160 | 160 |      { | 
| 161 | -        return $this->invoker->call('rmdir', [ $this->getPath($path) ]); | |
| 161 | +        return $this->invoker->call('rmdir', [$this->getPath($path)]); | |
| 162 | 162 | } | 
| 163 | 163 | |
| 164 | 164 | /** | 
| @@ -168,7 +168,7 @@ discard block | ||
| 168 | 168 | public function stat($path) | 
| 169 | 169 |      { | 
| 170 | 170 | return $this->invoker | 
| 171 | -            ->call('stat', [ $this->getPath($path) ]) | |
| 171 | +            ->call('stat', [$this->getPath($path)]) | |
| 172 | 172 |              ->then(function($info) { | 
| 173 | 173 |                  return $info ? array_filter($info, function($infoKey) { | 
| 174 | 174 | return !is_numeric($infoKey); | 
| @@ -191,7 +191,7 @@ discard block | ||
| 191 | 191 | */ | 
| 192 | 192 | public function symlink($srcPath, $dstPath) | 
| 193 | 193 |      { | 
| 194 | -        return $this->invoker->call('symlink', [ $this->getPath($srcPath), $this->getPath($dstPath) ]); | |
| 194 | +        return $this->invoker->call('symlink', [$this->getPath($srcPath), $this->getPath($dstPath)]); | |
| 195 | 195 | } | 
| 196 | 196 | |
| 197 | 197 | /** | 
| @@ -209,7 +209,7 @@ discard block | ||
| 209 | 209 | */ | 
| 210 | 210 | public function unlink($path) | 
| 211 | 211 |      { | 
| 212 | -        return $this->invoker->call('unlink', [ $this->getPath($path) ]); | |
| 212 | +        return $this->invoker->call('unlink', [$this->getPath($path)]); | |
| 213 | 213 | } | 
| 214 | 214 | |
| 215 | 215 | /** | 
| @@ -3,4 +3,5 @@ | ||
| 3 | 3 | namespace Dazzle\Filesystem; | 
| 4 | 4 | |
| 5 | 5 | interface FilesystemInterface extends DiskInterface | 
| 6 | -{} | |
| 6 | +{ | |
| 7 | +} | |
| @@ -3,4 +3,5 @@ | ||
| 3 | 3 | namespace Dazzle\Filesystem; | 
| 4 | 4 | |
| 5 | 5 | class Filesystem extends Disk implements FilesystemInterface | 
| 6 | -{} | |
| 6 | +{ | |
| 7 | +} | |
| @@ -5,4 +5,5 @@ | ||
| 5 | 5 | use Dazzle\Filesystem\Driver\DriverInterface; | 
| 6 | 6 | |
| 7 | 7 | interface DiskInterface extends DriverInterface | 
| 8 | -{} | |
| 8 | +{ | |
| 9 | +} | |