1
0
Fork 0
mirror of synced 2024-09-28 15:31:43 +12:00

Updated src folder

This commit is contained in:
Eldad Fux 2020-10-27 21:44:15 +02:00
parent b79188a07e
commit 6392ceef55
21 changed files with 55 additions and 52 deletions

View file

@ -9,9 +9,14 @@ use Appwrite\Auth\OAuth2;
class Box extends OAuth2
{
/**
* @var string
*/
private $endpoint = 'https://account.box.com/api/oauth2/';
/**
* @var string
*/
private $resourceEndpoint = 'https://api.box.com/2.0/';
/**
@ -19,6 +24,9 @@ class Box extends OAuth2
*/
protected $user = [];
/**
* @var array
*/
protected $scopes = [
'manage_app_users',
];
@ -148,5 +156,4 @@ class Box extends OAuth2
return $this->user;
}
}

View file

@ -16,7 +16,6 @@ class Env
*/
public function __construct(string $data)
{
$data = explode("\n", $data);
foreach ($data as &$row) {

View file

@ -72,8 +72,7 @@ class Response extends UtopiaResponse
$this->compressed
) && ($length <= $chunk)) { // Dont compress with GZIP / Brotli if header is not listed and size is bigger than 2mb
$this->swoole->end($body);
}
else {
} else {
for ($i=0; $i < ceil($length / $chunk); $i++) {
$this->swoole->write(substr($body, ($i * $chunk), min((($i * $chunk) + $chunk), $length)));
}

View file

@ -130,8 +130,7 @@ class Response extends UtopiaResponse
if (!$document->isSet($key)) {
if (!is_null($rule['default'])) {
$document->setAttribute($key, $rule['default']);
}
else {
} else {
throw new Exception('Missing response key: '.$key);
}
}

View file

@ -9,7 +9,6 @@ class File extends Model
{
public function __construct()
{
}
/**