linter fixes
This commit is contained in:
parent
031c8a5594
commit
082967095e
13 changed files with 79 additions and 60 deletions
|
@ -13,4 +13,3 @@ $cliPlatform->init('CLI');
|
||||||
|
|
||||||
$cli = $cliPlatform->getCli();
|
$cli = $cliPlatform->getCli();
|
||||||
$cli->run();
|
$cli->run();
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,8 @@ namespace Appwrite\Task;
|
||||||
|
|
||||||
use Utopia\Platform\Platform;
|
use Utopia\Platform\Platform;
|
||||||
|
|
||||||
class CLIPlatform extends Platform {
|
class CLIPlatform extends Platform
|
||||||
|
{
|
||||||
public function __construct()
|
public function __construct()
|
||||||
{
|
{
|
||||||
$this->addService('cliTasks', new Tasks());
|
$this->addService('cliTasks', new Tasks());
|
||||||
|
|
|
@ -11,7 +11,8 @@ use Utopia\Storage\Storage;
|
||||||
use Utopia\Domains\Domain;
|
use Utopia\Domains\Domain;
|
||||||
use Utopia\Platform\Action;
|
use Utopia\Platform\Action;
|
||||||
|
|
||||||
class Doctor extends Action{
|
class Doctor extends Action
|
||||||
|
{
|
||||||
public const NAME = 'doctor';
|
public const NAME = 'doctor';
|
||||||
|
|
||||||
public function __construct()
|
public function __construct()
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace Appwrite\Task;
|
namespace Appwrite\Task;
|
||||||
|
|
||||||
use Appwrite\Auth\Auth;
|
use Appwrite\Auth\Auth;
|
||||||
|
@ -11,7 +12,8 @@ use Utopia\Config\Config;
|
||||||
use Utopia\Validator\Text;
|
use Utopia\Validator\Text;
|
||||||
use Utopia\Platform\Action;
|
use Utopia\Platform\Action;
|
||||||
|
|
||||||
class Install extends Action{
|
class Install extends Action
|
||||||
|
{
|
||||||
public const NAME = 'install';
|
public const NAME = 'install';
|
||||||
|
|
||||||
public function __construct()
|
public function __construct()
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace Appwrite\Task;
|
namespace Appwrite\Task;
|
||||||
|
|
||||||
use Appwrite\Auth\Auth;
|
use Appwrite\Auth\Auth;
|
||||||
|
@ -14,7 +15,8 @@ use Utopia\Database\Document;
|
||||||
use Utopia\Database\Query;
|
use Utopia\Database\Query;
|
||||||
use Utopia\Platform\Action;
|
use Utopia\Platform\Action;
|
||||||
|
|
||||||
class Maintenance extends Action {
|
class Maintenance extends Action
|
||||||
|
{
|
||||||
public const NAME = 'maintenance';
|
public const NAME = 'maintenance';
|
||||||
|
|
||||||
protected function getConsoleDB(): Database
|
protected function getConsoleDB(): Database
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace Appwrite\Task;
|
namespace Appwrite\Task;
|
||||||
|
|
||||||
use Utopia\Platform\Action;
|
use Utopia\Platform\Action;
|
||||||
|
@ -13,8 +14,8 @@ use Utopia\Database\Validator\Authorization;
|
||||||
use Utopia\Validator\Text;
|
use Utopia\Validator\Text;
|
||||||
use Swoole\Event;
|
use Swoole\Event;
|
||||||
|
|
||||||
class Migrate extends Action{
|
class Migrate extends Action
|
||||||
|
{
|
||||||
public const NAME = 'migrate';
|
public const NAME = 'migrate';
|
||||||
|
|
||||||
public function __construct()
|
public function __construct()
|
||||||
|
@ -24,7 +25,8 @@ class Migrate extends Action{
|
||||||
->callback(fn ($version) => $this->action($version));
|
->callback(fn ($version) => $this->action($version));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function action($version) {
|
public function action($version)
|
||||||
|
{
|
||||||
global $register;
|
global $register;
|
||||||
Authorization::disable();
|
Authorization::disable();
|
||||||
if (!array_key_exists($version, Migration::$versions)) {
|
if (!array_key_exists($version, Migration::$versions)) {
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace Appwrite\Task;
|
namespace Appwrite\Task;
|
||||||
|
|
||||||
use Utopia\Platform\Action;
|
use Utopia\Platform\Action;
|
||||||
|
@ -24,8 +25,8 @@ use Appwrite\SDK\Language\SwiftClient;
|
||||||
use Exception;
|
use Exception;
|
||||||
use Throwable;
|
use Throwable;
|
||||||
|
|
||||||
class SDKs extends Action{
|
class SDKs extends Action
|
||||||
|
{
|
||||||
public const NAME = 'sdks';
|
public const NAME = 'sdks';
|
||||||
|
|
||||||
public function __construct()
|
public function __construct()
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace Appwrite\Task;
|
namespace Appwrite\Task;
|
||||||
|
|
||||||
use Utopia\Platform\Action;
|
use Utopia\Platform\Action;
|
||||||
|
@ -8,8 +9,8 @@ use Utopia\CLI\Console;
|
||||||
use Utopia\Database\Document;
|
use Utopia\Database\Document;
|
||||||
use Utopia\Validator\Hostname;
|
use Utopia\Validator\Hostname;
|
||||||
|
|
||||||
class SSL extends Action{
|
class SSL extends Action
|
||||||
|
{
|
||||||
public const NAME = 'ssl';
|
public const NAME = 'ssl';
|
||||||
|
|
||||||
public function __construct()
|
public function __construct()
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace Appwrite\Task;
|
namespace Appwrite\Task;
|
||||||
|
|
||||||
use Utopia\Platform\Action;
|
use Utopia\Platform\Action;
|
||||||
|
@ -15,8 +16,8 @@ use Utopia\Request;
|
||||||
use Utopia\Validator\WhiteList;
|
use Utopia\Validator\WhiteList;
|
||||||
use Exception;
|
use Exception;
|
||||||
|
|
||||||
class Specs extends Action{
|
class Specs extends Action
|
||||||
|
{
|
||||||
public const NAME = 'specs';
|
public const NAME = 'specs';
|
||||||
|
|
||||||
public function __construct()
|
public function __construct()
|
||||||
|
|
|
@ -1,9 +1,11 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace Appwrite\Task;
|
namespace Appwrite\Task;
|
||||||
|
|
||||||
use Utopia\Platform\Service;
|
use Utopia\Platform\Service;
|
||||||
|
|
||||||
class Tasks extends Service {
|
class Tasks extends Service
|
||||||
|
{
|
||||||
public function __construct()
|
public function __construct()
|
||||||
{
|
{
|
||||||
$this->type = self::TYPE_CLI;
|
$this->type = self::TYPE_CLI;
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace Appwrite\Task;
|
namespace Appwrite\Task;
|
||||||
|
|
||||||
use Throwable;
|
use Throwable;
|
||||||
|
@ -17,7 +18,8 @@ use Utopia\Registry\Registry;
|
||||||
use Utopia\Logger\Log;
|
use Utopia\Logger\Log;
|
||||||
use Utopia\Platform\Action;
|
use Utopia\Platform\Action;
|
||||||
|
|
||||||
class Usage extends Action{
|
class Usage extends Action
|
||||||
|
{
|
||||||
public const NAME = 'usage';
|
public const NAME = 'usage';
|
||||||
|
|
||||||
protected function getDatabase(Registry &$register, string $namespace): Database
|
protected function getDatabase(Registry &$register, string $namespace): Database
|
||||||
|
@ -87,7 +89,8 @@ class Usage extends Action{
|
||||||
->callback(fn () => $this->action());
|
->callback(fn () => $this->action());
|
||||||
}
|
}
|
||||||
|
|
||||||
public function action() {
|
public function action()
|
||||||
|
{
|
||||||
|
|
||||||
global $register;
|
global $register;
|
||||||
|
|
||||||
|
|
|
@ -1,12 +1,14 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace Appwrite\Task;
|
namespace Appwrite\Task;
|
||||||
|
|
||||||
use Utopia\App;
|
use Utopia\App;
|
||||||
use Utopia\Config\Config;
|
use Utopia\Config\Config;
|
||||||
use Utopia\CLI\Console;
|
use Utopia\CLI\Console;
|
||||||
use Utopia\Platform\Action;
|
use Utopia\Platform\Action;
|
||||||
|
|
||||||
class Vars extends Action{
|
class Vars extends Action
|
||||||
|
{
|
||||||
public const NAME = 'vars';
|
public const NAME = 'vars';
|
||||||
|
|
||||||
public function __construct()
|
public function __construct()
|
||||||
|
|
|
@ -1,11 +1,13 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace Appwrite\Task;
|
namespace Appwrite\Task;
|
||||||
|
|
||||||
use Utopia\App;
|
use Utopia\App;
|
||||||
use Utopia\CLI\Console;
|
use Utopia\CLI\Console;
|
||||||
use Utopia\Platform\Action;
|
use Utopia\Platform\Action;
|
||||||
|
|
||||||
class Version extends Action {
|
class Version extends Action
|
||||||
|
{
|
||||||
public const NAME = 'version';
|
public const NAME = 'version';
|
||||||
|
|
||||||
public function __construct()
|
public function __construct()
|
||||||
|
|
Loading…
Reference in a new issue