1
0
Fork 0
mirror of synced 2024-06-27 02:31:04 +12:00

fix linter issues in app directory

This commit is contained in:
Everly Precia Suresh 2022-05-30 17:41:25 +00:00
parent 60a73c74a5
commit 1fd7359fbb
6 changed files with 11 additions and 9 deletions

View file

@ -1,12 +1,12 @@
<?php <?php
use Utopia\App;
use Appwrite\Runtimes\Runtimes;
/** /**
* List of Appwrite Cloud Functions supported runtimes * List of Appwrite Cloud Functions supported runtimes
*/ */
use Utopia\App;
use Appwrite\Runtimes\Runtimes;
$runtimes = new Runtimes('v1'); $runtimes = new Runtimes('v1');
$allowList = empty(App::getEnv('_APP_FUNCTIONS_RUNTIMES')) ? [] : \explode(',', App::getEnv('_APP_FUNCTIONS_RUNTIMES')); $allowList = empty(App::getEnv('_APP_FUNCTIONS_RUNTIMES')) ? [] : \explode(',', App::getEnv('_APP_FUNCTIONS_RUNTIMES'));

View file

@ -136,7 +136,7 @@ function createAttribute(string $collectionId, Document $attribute, Response $re
$response->setStatusCode(Response::STATUS_CODE_CREATED); $response->setStatusCode(Response::STATUS_CODE_CREATED);
return $attribute; return $attribute;
}; }
App::post('/v1/database/collections') App::post('/v1/database/collections')
->desc('Create Collection') ->desc('Create Collection')

View file

@ -1,8 +1,5 @@
<?php <?php
use Appwrite\Extend\Exception;
use Utopia\App;
/** /**
* TODO: * TODO:
* 1. Map all objects, object-params, object-fields * 1. Map all objects, object-params, object-fields
@ -13,6 +10,9 @@ use Utopia\App;
* 6. Write tests! * 6. Write tests!
*/ */
use Appwrite\Extend\Exception;
use Utopia\App;
App::post('/v1/graphql') App::post('/v1/graphql')
->desc('GraphQL Endpoint') ->desc('GraphQL Endpoint')
->groups(['api', 'graphql']) ->groups(['api', 'graphql'])

View file

@ -114,7 +114,7 @@ function logError(Throwable $error, string $action, Utopia\Route $route = null)
Console::error('[Error] Message: ' . $error->getMessage()); Console::error('[Error] Message: ' . $error->getMessage());
Console::error('[Error] File: ' . $error->getFile()); Console::error('[Error] File: ' . $error->getFile());
Console::error('[Error] Line: ' . $error->getLine()); Console::error('[Error] Line: ' . $error->getLine());
}; }
function getStorageDevice($root): Device function getStorageDevice($root): Device
{ {

View file

@ -129,7 +129,7 @@ function getDatabase(Registry &$register, string $namespace)
$register->get('redisPool')->put($redis); $register->get('redisPool')->put($redis);
} }
]; ];
}; }
$server->onStart(function () use ($stats, $register, $containerId, &$statsDocument, $logError) { $server->onStart(function () use ($stats, $register, $containerId, &$statsDocument, $logError) {
sleep(5); // wait for the initial database schema to be ready sleep(5); // wait for the initial database schema to be ready

View file

@ -1,5 +1,7 @@
<?php <?php
namespace Appwrite\Resque;
use Appwrite\Event\Event; use Appwrite\Event\Event;
use Appwrite\Resque\Worker; use Appwrite\Resque\Worker;
use Utopia\Audit\Audit; use Utopia\Audit\Audit;