Skip to content

Commit

Permalink
Run Linter
Browse files Browse the repository at this point in the history
  • Loading branch information
PineappleIOnic committed Jun 3, 2024
1 parent 75ec3cc commit 0a598ae
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 deletions.
6 changes: 3 additions & 3 deletions tests/Migration/Unit/Adapters/MockDestination.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public static function getSupportedResources(): array
public function import(array $resources, callable $callback): void
{
foreach ($resources as $resource) {
/** @var Resource $resource */
/** @var resource $resource */
switch ($resource->getName()) {
case 'Deployment':
/** @var Deployment $resource */
Expand Down Expand Up @@ -69,11 +69,11 @@ public function report(array $groups = []): array

public function get(string $resource, string $id): ?array
{
if (!key_exists($resource, $this->data)) {
if (! array_key_exists($resource, $this->data)) {
return null;
}

if (!key_exists($id, $this->data[$resource])) {
if (! array_key_exists($id, $this->data[$resource])) {
return null;
}

Expand Down
14 changes: 6 additions & 8 deletions tests/Migration/Unit/Sources/AppwriteTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ public static function setUpBeforeClass(): void
// If we've already bootstrapped Appwrite, skip
if (file_exists('projects.json')) {
Console::info('Appwrite already bootstrapped, skipping');

return;
}

Expand Down Expand Up @@ -138,7 +139,7 @@ public function testValidateTransfer($state)
$this->assertNotEmpty($counters);

if ($counters[Resource::STATUS_ERROR] > 0) {
$this->fail('Resource ' . $resource . ' has ' . $counters[Resource::STATUS_ERROR] . ' errors');
$this->fail('Resource '.$resource.' has '.$counters[Resource::STATUS_ERROR].' errors');

return;
}
Expand All @@ -154,7 +155,7 @@ public function testValidateAuthTransfer($state): void
{
// Process all users from Appwrite source and check if our copy is 1:1
$userClient = new Users($this->client);

/** @var Transfer $transfer */
$transfer = $state['transfer'];

Expand All @@ -172,7 +173,7 @@ public function testValidateAuthTransfer($state): void
$destinationUser = $destination->get('user', $user['$id']);

if (empty($destinationUser)) {
$this->fail('User ' . $user['$id'] . ' not found in destination');
$this->fail('User '.$user['$id'].' not found in destination');
}

// Compare data
Expand Down Expand Up @@ -224,11 +225,8 @@ public function testValidateStorageTransfer($state): void

/**
* Compare data between original and copy ignoring any fields that are not relevant
*
* @param array $original
* @param array $copy
* @param array $ignore
*
*
*
* @return bool
*/
private function compareData(array $original, array $copy, array $ignore)
Expand Down

0 comments on commit 0a598ae

Please sign in to comment.