Skip to content

Commit

Permalink
Merge pull request #112 from netgen/fix-tests
Browse files Browse the repository at this point in the history
Fix tests
  • Loading branch information
RandyCupic authored Sep 20, 2024
2 parents 19b2964 + 2f86960 commit dca4631
Show file tree
Hide file tree
Showing 17 changed files with 649 additions and 238 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/coding_standards.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ jobs:

steps:
- uses: actions/checkout@v3
- uses: OskarStark/php-cs-fixer-ga@master
- uses: docker://oskarstark/php-cs-fixer-ga
with:
args: --diff --dry-run
4 changes: 3 additions & 1 deletion bundle/Command/RefreshStoredResourcesCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,9 @@ protected function execute(InputInterface $input, OutputInterface $output): int
do {
$resources = $this->getBatch($this->batchSize, $offset);

$this->refreshResources($resources);
if (count($resources) > 0) {
$this->refreshResources($resources);
}

$offset += $this->batchSize;
} while (count($resources) > 0);
Expand Down
2 changes: 1 addition & 1 deletion bundle/Controller/Callback/Cloudinary/Notify.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public function __construct(
ProviderInterface $provider,
RequestVerifierInterface $signatureVerifier,
EntityManagerInterface $entityManager,
EventDispatcherInterface $eventDispatcher
EventDispatcherInterface $eventDispatcher,
) {
$this->gateway = $gateway;
$this->provider = $provider;
Expand Down
2 changes: 1 addition & 1 deletion lib/API/Values/RemoteResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public function __construct(
private ?string $name = null,
private ?string $originalFilename = null,
private ?string $version = null,
private ?string $visibility = self::VISIBILITY_PUBLIC,
private string $visibility = self::VISIBILITY_PUBLIC,
private ?Folder $folder = null,
private int $size = 0,
private ?string $altText = null,
Expand Down
2 changes: 1 addition & 1 deletion lib/Core/Provider/Cloudinary/Factory/RemoteResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ private function resolveOriginalFilename(array $data): string
return $data['context']['custom']['original_filename'];
}

return $data['context']['original_filename'] ?? basename((string) $data['secure_url']);
return $data['context']['original_filename'] ?? basename((string) $data['secure_url'] ?? (string) $data['url']);
}

/**
Expand Down
Loading

0 comments on commit dca4631

Please sign in to comment.