update: rename remaining variables.

This commit is contained in:
Darshan 2025-05-06 16:58:56 +05:30
parent 7a52ace9b2
commit 6eb1c3ae68
6 changed files with 16 additions and 16 deletions

View file

@ -175,7 +175,7 @@ class Create extends Action
$relationships = \array_filter(
$table->getAttribute('attributes', []),
fn ($attribute) => $attribute->getAttribute('type') === Database::VAR_RELATIONSHIP
fn ($column) => $column->getAttribute('type') === Database::VAR_RELATIONSHIP
);
foreach ($relationships as $relationship) {
@ -257,7 +257,7 @@ class Create extends Action
$relationships = \array_filter(
$table->getAttribute('attributes', []),
fn ($attribute) => $attribute->getAttribute('type') === Database::VAR_RELATIONSHIP
fn ($column) => $column->getAttribute('type') === Database::VAR_RELATIONSHIP
);
foreach ($relationships as $relationship) {
@ -296,10 +296,10 @@ class Create extends Action
->dynamic($row, UtopiaResponse::MODEL_ROW);
$relationships = \array_map(
fn ($document) => $document->getAttribute('key'),
fn ($row) => $row->getAttribute('key'),
\array_filter(
$table->getAttribute('attributes', []),
fn ($attribute) => $attribute->getAttribute('type') === Database::VAR_RELATIONSHIP
fn ($column) => $column->getAttribute('type') === Database::VAR_RELATIONSHIP
)
);

View file

@ -112,7 +112,7 @@ class Delete extends Action
$relationships = \array_filter(
$table->getAttribute('attributes', []),
fn ($attribute) => $attribute->getAttribute('type') === Database::VAR_RELATIONSHIP
fn ($column) => $column->getAttribute('type') === Database::VAR_RELATIONSHIP
);
foreach ($relationships as $relationship) {
@ -147,10 +147,10 @@ class Delete extends Action
$response->addHeader('X-Debug-Operations', 1);
$relationships = \array_map(
fn ($document) => $document->getAttribute('key'),
fn ($row) => $row->getAttribute('key'),
\array_filter(
$table->getAttribute('attributes', []),
fn ($attribute) => $attribute->getAttribute('type') === Database::VAR_RELATIONSHIP
fn ($column) => $column->getAttribute('type') === Database::VAR_RELATIONSHIP
)
);

View file

@ -110,7 +110,7 @@ class Get extends Action
$relationships = \array_filter(
$table->getAttribute('attributes', []),
fn ($attribute) => $attribute->getAttribute('type') === Database::VAR_RELATIONSHIP
fn ($column) => $column->getAttribute('type') === Database::VAR_RELATIONSHIP
);
foreach ($relationships as $relationship) {

View file

@ -156,7 +156,7 @@ class Update extends Action
$relationships = \array_filter(
$table->getAttribute('attributes', []),
fn ($attribute) => $attribute->getAttribute('type') === Database::VAR_RELATIONSHIP
fn ($column) => $column->getAttribute('type') === Database::VAR_RELATIONSHIP
);
foreach ($relationships as $relationship) {
@ -253,7 +253,7 @@ class Update extends Action
$relationships = \array_filter(
$table->getAttribute('attributes', []),
fn ($attribute) => $attribute->getAttribute('type') === Database::VAR_RELATIONSHIP
fn ($column) => $column->getAttribute('type') === Database::VAR_RELATIONSHIP
);
foreach ($relationships as $relationship) {
@ -284,10 +284,10 @@ class Update extends Action
$response->dynamic($row, UtopiaResponse::MODEL_ROW);
$relationships = \array_map(
fn ($document) => $document->getAttribute('key'),
fn ($row) => $row->getAttribute('key'),
\array_filter(
$table->getAttribute('attributes', []),
fn ($attribute) => $attribute->getAttribute('type') === Database::VAR_RELATIONSHIP
fn ($column) => $column->getAttribute('type') === Database::VAR_RELATIONSHIP
)
);

View file

@ -136,7 +136,7 @@ class XList extends Action
$relationships = \array_filter(
$table->getAttribute('attributes', []),
fn ($attribute) => $attribute->getAttribute('type') === Database::VAR_RELATIONSHIP
fn ($column) => $column->getAttribute('type') === Database::VAR_RELATIONSHIP
);
foreach ($relationships as $relationship) {

View file

@ -539,9 +539,9 @@ class Databases extends Action
Query::contains('options', ['"relatedCollection":"'. $collectionId .'"']),
],
$dbForProject,
function ($attribute) use ($dbForProject, $databaseInternalId) {
$dbForProject->purgeCachedDocument('database_' . $databaseInternalId, $attribute->getAttribute('collectionId'));
$dbForProject->purgeCachedCollection('database_' . $databaseInternalId . '_collection_' . $attribute->getAttribute('collectionInternalId'));
function ($column) use ($dbForProject, $databaseInternalId) {
$dbForProject->purgeCachedDocument('database_' . $databaseInternalId, $column->getAttribute('collectionId'));
$dbForProject->purgeCachedCollection('database_' . $databaseInternalId . '_collection_' . $column->getAttribute('collectionInternalId'));
}
);