Skip to content

Commit

Permalink
replace warmsUpCache -> warmUpCache
Browse files Browse the repository at this point in the history
  • Loading branch information
Peter Gribanov committed Oct 7, 2021
1 parent a957d05 commit 0675849
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion Async/ResolveCacheProcessor.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public function process(Message $psrMessage, Context $psrContext)
$results = [];

foreach ($filters as $filter) {
$this->filterService->warmsUpCache($path, $filter, null, $message->isForce());
$this->filterService->warmUpCache($path, $filter, null, $message->isForce());

$results[$filter] = $this->filterService->getUrlOfFilteredImage($path, $filter);
}
Expand Down
2 changes: 1 addition & 1 deletion Command/ResolveCacheCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ private function runCacheImageResolve(string $image, string $filter, bool $force
$this->io->group($image, $filter, 'blue');

try {
if ($this->filterService->warmsUpCache($image, $filter, null, $forced)) {
if ($this->filterService->warmUpCache($image, $filter, null, $forced)) {
$this->io->status('resolved', 'green');
} else {
$this->io->status('cached', 'white');
Expand Down
10 changes: 5 additions & 5 deletions Service/FilterService.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ public function bustCache($path, $filter)
*
* @return bool Returns true if the cache is warmed up
*/
public function warmsUpCache(
public function warmUpCache(
string $path,
string $filter,
?string $resolver = null,
Expand All @@ -102,7 +102,7 @@ public function warmsUpCache(
$warmedUp = false;

foreach ($this->buildFilterPathContainers($path) as $filterPathContainer) {
if ($this->warmsUpCacheFilterPathContainer($filterPathContainer, $filter, $resolver, $forced)) {
if ($this->warmUpCacheFilterPathContainer($filterPathContainer, $filter, $resolver, $forced)) {
$warmedUp = true;
}
}
Expand All @@ -120,7 +120,7 @@ public function warmsUpCache(
public function getUrlOfFilteredImage($path, $filter, $resolver = null, bool $webpSupported = false)
{
foreach ($this->buildFilterPathContainers($path) as $filterPathContainer) {
$this->warmsUpCacheFilterPathContainer($filterPathContainer, $filter, $resolver);
$this->warmUpCacheFilterPathContainer($filterPathContainer, $filter, $resolver);
}

return $this->resolveFilterPathContainer(new FilterPathContainer($path), $filter, $resolver, $webpSupported);
Expand All @@ -146,7 +146,7 @@ public function getUrlOfFilteredImageWithRuntimeFilters(
];

foreach ($this->buildFilterPathContainers($path, $runtimePath, $runtimeOptions) as $filterPathContainer) {
$this->warmsUpCacheFilterPathContainer($filterPathContainer, $filter, $resolver);
$this->warmUpCacheFilterPathContainer($filterPathContainer, $filter, $resolver);
}

return $this->resolveFilterPathContainer(
Expand Down Expand Up @@ -194,7 +194,7 @@ private function resolveFilterPathContainer(
*
* @return bool Returns true if the cache is warmed up
*/
private function warmsUpCacheFilterPathContainer(
private function warmUpCacheFilterPathContainer(
FilterPathContainer $filterPathContainer,
string $filter,
?string $resolver = null,
Expand Down
2 changes: 1 addition & 1 deletion Tests/Async/ResolveCacheProcessorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ public function testShouldBurstCacheWhenResolvingForced(): void
$filterServiceMock = $this->createFilterServiceMock();
$filterServiceMock
->expects($this->once())
->method('warmsUpCache')
->method('warmUpCache')
->with($imagePath, $filterName, null, $force);

$processor = new ResolveCacheProcessor(
Expand Down
10 changes: 5 additions & 5 deletions Tests/Service/FilterServiceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ public function testWarmsUpCache(bool $webpGenerate): void
->expects($this->never())
->method('applyFilter');

$this->assertFalse($service->warmsUpCache(self::SOURCE_IMAGE, self::FILTER, $resolver));
$this->assertFalse($service->warmUpCache(self::SOURCE_IMAGE, self::FILTER, $resolver));
}

/**
Expand Down Expand Up @@ -214,7 +214,7 @@ public function testWarmsUpCacheForced(bool $webpGenerate): void
)
->willReturn($binary);

$this->assertTrue($service->warmsUpCache(self::SOURCE_IMAGE, self::FILTER, $resolver, true));
$this->assertTrue($service->warmUpCache(self::SOURCE_IMAGE, self::FILTER, $resolver, true));
}

/**
Expand Down Expand Up @@ -265,7 +265,7 @@ public function testWarmsUpCacheNotStored(bool $webpGenerate): void
)
->willReturn($binary);

$this->assertTrue($service->warmsUpCache(self::SOURCE_IMAGE, self::FILTER, $resolver));
$this->assertTrue($service->warmUpCache(self::SOURCE_IMAGE, self::FILTER, $resolver));
}

/**
Expand Down Expand Up @@ -311,7 +311,7 @@ public function testWarmsUpCacheNotStoredForced(bool $webpGenerate): void
)
->willReturn($binary);

$this->assertTrue($service->warmsUpCache(self::SOURCE_IMAGE, self::FILTER, $resolver, true));
$this->assertTrue($service->warmUpCache(self::SOURCE_IMAGE, self::FILTER, $resolver, true));
}

/**
Expand Down Expand Up @@ -356,7 +356,7 @@ public function testWarmsUpCacheNonExistingFilter(bool $webpGenerate): void
$exception->getMessage()
));

$service->warmsUpCache(self::SOURCE_IMAGE, self::FILTER, $resolver, true);
$service->warmUpCache(self::SOURCE_IMAGE, self::FILTER, $resolver, true);
}

/**
Expand Down

0 comments on commit 0675849

Please sign in to comment.