remove unneeded variable and use type casting instead of intval

This commit is contained in:
Robin Appelman 2018-03-28 15:36:54 +02:00
commit a2cf2aca97
2 changed files with 2 additions and 3 deletions

View file

@ -133,7 +133,7 @@ class Parser {
return [ return [
'mtime' => strtotime($data['write_time']), 'mtime' => strtotime($data['write_time']),
'mode' => hexdec(substr($data['attributes'], strpos($data['attributes'], '('), -1)), 'mode' => hexdec(substr($data['attributes'], strpos($data['attributes'], '('), -1)),
'size' => isset($data['stream']) ? intval(explode(' ', $data['stream'])[1]) : 0 'size' => isset($data['stream']) ? (int)(explode(' ', $data['stream'])[1]) : 0
]; ];
} }

View file

@ -370,8 +370,7 @@ class Share extends AbstractShare {
protected function execute($command) { protected function execute($command) {
$this->connect(); $this->connect();
$this->connection->write($command . PHP_EOL); $this->connection->write($command . PHP_EOL);
$output = $this->connection->read(); return $this->connection->read();
return $output;
} }
/** /**