Update dependencies and refactor code for clarity

- Changed version constraint for `spomky-labs/otphp` in composer.json to allow any 11.x version.
- Refactored `getDatabasesDBForProject` method in Migrations class to use the shorthand syntax for callable.
- Updated return values in Format class to use more descriptive types for index creation.
- Corrected parameter documentation in Attributes class for clarity and consistency.
This commit is contained in:
ArnabChatterjee20k
2026-03-10 15:49:03 +05:30
parent 9f78fc5341
commit 52e2276445
4 changed files with 8 additions and 8 deletions
+1 -1
View File
@@ -87,7 +87,7 @@
"phpmailer/phpmailer": "6.9.*",
"chillerlan/php-qrcode": "4.3.*",
"adhocore/jwt": "1.1.*",
"spomky-labs/otphp": "^11.4.2",
"spomky-labs/otphp": "11.*",
"webonyx/graphql-php": "14.11.*",
"league/csv": "9.14.*",
"enshrined/svg-sanitize": "0.22.*"
+2 -2
View File
@@ -544,9 +544,9 @@ class Migrations extends Action
protected function getDatabasesDBForProject(Document $database)
{
if ($this->sourceProject) {
return call_user_func($this->getDatabasesDB, $database, $this->sourceProject);
return ($this->getDatabasesDB)($database, $this->sourceProject);
}
return call_user_func($this->getDatabasesDB, $database);
return ($this->getDatabasesDB)($database);
}
/**
+3 -3
View File
@@ -309,7 +309,7 @@ abstract class Format
case 'createIndex':
switch ($param) {
case 'type':
return 'IndexType';
return 'DatabasesIndexType';
case 'orders':
return 'OrderBy';
}
@@ -342,7 +342,7 @@ abstract class Format
case 'createIndex':
switch ($param) {
case 'type':
return 'IndexType';
return 'TablesDBIndexType';
case 'orders':
return 'OrderBy';
}
@@ -361,7 +361,7 @@ abstract class Format
case 'createIndex':
switch ($param) {
case 'type':
return 'IndexType';
return 'DocumentsDBIndexType';
case 'orders':
return 'OrderBy';
}
@@ -45,7 +45,7 @@ class Attributes extends Validator
/**
* @param int $maxAttributes Maximum number of attributes allowed
* @param bool $supportForSpatialAttributes Whether DB supports spatial attributes
* @param bool $supportForSpatialAttributes Whether DB supports attributes or not
* @param bool $supportForAttributes Whether DB supports attributes or not
*/
public function __construct(
int $maxAttributes = APP_LIMIT_ARRAY_PARAMS_SIZE,
@@ -81,7 +81,7 @@ class Attributes extends Validator
}
if (\count($value) && !$this->supportForAttributes) {
$this->message = "Attributes are not supported by the current database";
$this->message = 'Attributes are not supported by the current database';
return false;
}