Updated src folder
This commit is contained in:
parent
b79188a07e
commit
6392ceef55
21 changed files with 55 additions and 52 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
}
|
|
@ -16,7 +16,6 @@ class Env
|
|||
*/
|
||||
public function __construct(string $data)
|
||||
{
|
||||
|
||||
$data = explode("\n", $data);
|
||||
|
||||
foreach ($data as &$row) {
|
||||
|
|
|
@ -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)));
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,7 +9,6 @@ class File extends Model
|
|||
{
|
||||
public function __construct()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue