Skip to content

Commit

Permalink
Fix linter
Browse files Browse the repository at this point in the history
  • Loading branch information
fogelito committed Sep 24, 2024
1 parent cea09dc commit 9c0806e
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 37 deletions.
2 changes: 1 addition & 1 deletion bin/MigrationCLI.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class MigrationCLI

protected mixed $destination;

protected const array STRUCTURE = [
protected const STRUCTURE = [
'$collection' => 'databases',
'$id' => 'collections',
'name' => 'Collections',
Expand Down
16 changes: 8 additions & 8 deletions src/Migration/Resources/Auth/Hash.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,21 @@
*/
class Hash extends Resource
{
public const string ALGORITHM_SCRYPT_MODIFIED = 'scryptModified';
public const ALGORITHM_SCRYPT_MODIFIED = 'scryptModified';

public const string ALGORITHM_BCRYPT = 'bcrypt';
public const ALGORITHM_BCRYPT = 'bcrypt';

public const string ALGORITHM_MD5 = 'md5';
public const ALGORITHM_MD5 = 'md5';

public const string ALGORITHM_ARGON2 = 'argon2';
public const ALGORITHM_ARGON2 = 'argon2';

public const string ALGORITHM_SHA256 = 'sha256';
public const ALGORITHM_SHA256 = 'sha256';

public const string ALGORITHM_PHPASS = 'phpass';
public const ALGORITHM_PHPASS = 'phpass';

public const string ALGORITHM_SCRYPT = 'scrypt';
public const ALGORITHM_SCRYPT = 'scrypt';

public const string ALGORITHM_PLAINTEXT = 'plainText';
public const ALGORITHM_PLAINTEXT = 'plainText';

public function __construct(
private readonly string $hash,
Expand Down
20 changes: 10 additions & 10 deletions src/Migration/Resources/Database/Attribute.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,16 @@

abstract class Attribute extends Resource
{
public const string TYPE_STRING = 'string';
public const string TYPE_INTEGER = 'int';
public const string TYPE_FLOAT = 'float';
public const string TYPE_BOOLEAN = 'bool';
public const string TYPE_DATETIME = 'dateTime';
public const string TYPE_EMAIL = 'email';
public const string TYPE_ENUM = 'enum';
public const string TYPE_IP = 'IP';
public const string TYPE_URL = 'URL';
public const string TYPE_RELATIONSHIP = 'relationship';
public const TYPE_STRING = 'string';
public const TYPE_INTEGER = 'int';
public const TYPE_FLOAT = 'float';
public const TYPE_BOOLEAN = 'bool';
public const TYPE_DATETIME = 'dateTime';
public const TYPE_EMAIL = 'email';
public const TYPE_ENUM = 'enum';
public const TYPE_IP = 'IP';
public const TYPE_URL = 'URL';
public const TYPE_RELATIONSHIP = 'relationship';

/**
* @param string $key
Expand Down
6 changes: 3 additions & 3 deletions src/Migration/Resources/Database/Index.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@

class Index extends Resource
{
public const string TYPE_UNIQUE = 'unique';
public const TYPE_UNIQUE = 'unique';

public const string TYPE_FULLTEXT = 'fulltext';
public const TYPE_FULLTEXT = 'fulltext';

public const string TYPE_KEY = 'key';
public const TYPE_KEY = 'key';

/**
* @param string $id
Expand Down
2 changes: 1 addition & 1 deletion src/Migration/Sources/Appwrite.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public function __construct(
string $endpoint,
protected string $key
) {
$this->client = (new Client)
$this->client = (new Client())
->setEndpoint($endpoint)
->setProject($project)
->setKey($key);
Expand Down
28 changes: 14 additions & 14 deletions src/Migration/Transfer.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,47 +4,47 @@

class Transfer
{
public const string GROUP_GENERAL = 'general';
public const GROUP_GENERAL = 'general';

public const string GROUP_AUTH = 'auth';
public const GROUP_AUTH = 'auth';

public const string GROUP_STORAGE = 'storage';
public const GROUP_STORAGE = 'storage';

public const string GROUP_FUNCTIONS = 'functions';
public const GROUP_FUNCTIONS = 'functions';

public const string GROUP_DATABASES = 'databases';
public const GROUP_DATABASES = 'databases';

public const string GROUP_SETTINGS = 'settings';
public const GROUP_SETTINGS = 'settings';

public const array GROUP_AUTH_RESOURCES = [
public const GROUP_AUTH_RESOURCES = [
Resource::TYPE_USER,
Resource::TYPE_TEAM,
Resource::TYPE_MEMBERSHIP,
Resource::TYPE_HASH
];

public const array GROUP_STORAGE_RESOURCES = [
public const GROUP_STORAGE_RESOURCES = [
Resource::TYPE_FILE,
Resource::TYPE_BUCKET
];

public const array GROUP_FUNCTIONS_RESOURCES = [
public const GROUP_FUNCTIONS_RESOURCES = [
Resource::TYPE_FUNCTION,
Resource::TYPE_ENVIRONMENT_VARIABLE,
Resource::TYPE_DEPLOYMENT
];

public const array GROUP_DATABASES_RESOURCES = [
public const GROUP_DATABASES_RESOURCES = [
Resource::TYPE_DATABASE,
Resource::TYPE_COLLECTION,
Resource::TYPE_INDEX,
Resource::TYPE_ATTRIBUTE,
Resource::TYPE_DOCUMENT
];

public const array GROUP_SETTINGS_RESOURCES = [];
public const GROUP_SETTINGS_RESOURCES = [];

public const array ALL_PUBLIC_RESOURCES = [
public const ALL_PUBLIC_RESOURCES = [
Resource::TYPE_USER,
Resource::TYPE_TEAM,
Resource::TYPE_MEMBERSHIP,
Expand All @@ -60,15 +60,15 @@ class Transfer
Resource::TYPE_DOCUMENT,
];

public const array ROOT_RESOURCES = [
public const ROOT_RESOURCES = [
Resource::TYPE_BUCKET,
Resource::TYPE_DATABASE,
Resource::TYPE_FUNCTION,
Resource::TYPE_USER,
Resource::TYPE_TEAM,
];

public const int STORAGE_MAX_CHUNK_SIZE = 1024 * 1024 * 5; // 5MB
public const STORAGE_MAX_CHUNK_SIZE = 1024 * 1024 * 5; // 5MB

protected Source $source;

Expand Down

0 comments on commit 9c0806e

Please sign in to comment.