@@ -8,7 +8,7 @@ discard block |
||
8 | 8 | */ |
9 | 9 | class CGI extends AppInstance { |
10 | 10 | |
11 | - public $binPath = 'php-cgi'; // Default bin-path |
|
11 | + public $binPath = 'php-cgi'; // Default bin-path |
|
12 | 12 | public $binAliases = array( |
13 | 13 | 'php5' => '/usr/local/php/bin/php-cgi', |
14 | 14 | 'php6' => '/usr/local/php6/bin/php-cgi', |
@@ -17,7 +17,7 @@ discard block |
||
17 | 17 | 'ruby' => '/usr/local/bin/ruby', |
18 | 18 | ); |
19 | 19 | |
20 | - public $chroot = '/'; // default chroot |
|
20 | + public $chroot = '/'; // default chroot |
|
21 | 21 | |
22 | 22 | /** |
23 | 23 | * Setting default config options |
@@ -71,8 +71,8 @@ discard block |
||
71 | 71 | |
72 | 72 | $this->proc = new AsyncProcess; |
73 | 73 | $this->proc->readPacketSize = $this->appInstance->readPacketSize; |
74 | - $this->proc->onReadData(array($this,'onReadData')); |
|
75 | - $this->proc->onWrite(array($this,'onWrite')); |
|
74 | + $this->proc->onReadData(array($this, 'onReadData')); |
|
75 | + $this->proc->onWrite(array($this, 'onWrite')); |
|
76 | 76 | $this->proc->binPath = $this->appInstance->binPath; |
77 | 77 | $this->proc->chroot = $this->appInstance->chroot; |
78 | 78 |
@@ -75,10 +75,10 @@ discard block |
||
75 | 75 | } |
76 | 76 | if ($stat['type'] === 'd') { |
77 | 77 | if (!FS::$supported) { |
78 | - $req->file(rtrim($path,'/') . '/index.html'); |
|
78 | + $req->file(rtrim($path, '/') . '/index.html'); |
|
79 | 79 | } |
80 | - else $job('readdir', function ($name, $job) use ($path, $req) { |
|
81 | - FS::readdir(rtrim($path,'/'), function ($path, $dir) use ($job, $req) { |
|
80 | + else $job('readdir', function($name, $job) use ($path, $req) { |
|
81 | + FS::readdir(rtrim($path, '/'), function($path, $dir) use ($job, $req) { |
|
82 | 82 | $found = false; |
83 | 83 | if (is_array($dir)) { |
84 | 84 | foreach ($dir['dents'] as $file) { |
@@ -114,7 +114,7 @@ discard block |
||
114 | 114 | try { |
115 | 115 | $req->header('404 Not Found'); |
116 | 116 | $req->header('Content-Type: text/html'); |
117 | - } catch (RequestHeadersAlreadySent $e ) {} |
|
117 | + } catch (RequestHeadersAlreadySent $e) {} |
|
118 | 118 | $req->out('File not found.'); |
119 | 119 | } |
120 | 120 | public function file($path) { |
@@ -125,7 +125,7 @@ discard block |
||
125 | 125 | } |
126 | 126 | $req = $this; |
127 | 127 | $job = $this->job; |
128 | - $job('readfile', function ($name, $job) use ($req, $path) { |
|
128 | + $job('readfile', function($name, $job) use ($req, $path) { |
|
129 | 129 | $req->sendfile($path, function($file, $success) use ($job, $name) { |
130 | 130 | $job->setResult($name); |
131 | 131 | }); |