Skip to content

Commit

Permalink
Rename contentResolver variable
Browse files Browse the repository at this point in the history
  • Loading branch information
Prokyonn committed Apr 8, 2021
1 parent 45b4789 commit 41ead1c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions Content/ContentTypeResolver/BlockResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public static function getContentType(): string
/**
* @var ContentResolverInterface
*/
private $resolver;
private $contentResolver;

/**
* @var \Traversable<BlockVisitorInterface>
Expand All @@ -41,7 +41,7 @@ public static function getContentType(): string
*/
public function __construct(ContentResolverInterface $contentResolver, \Traversable $blockVisitors)
{
$this->resolver = $contentResolver;
$this->contentResolver = $contentResolver;
$this->blockVisitors = $blockVisitors;
}

Expand Down Expand Up @@ -74,7 +74,7 @@ public function resolve($data, PropertyInterface $property, string $locale, arra
$view[$i] = [];

foreach ($blockPropertyType->getChildProperties() as $childProperty) {
$contentView = $this->resolver->resolve($childProperty->getValue(), $childProperty, $locale, $attributes);
$contentView = $this->contentResolver->resolve($childProperty->getValue(), $childProperty, $locale, $attributes);

$content[$i][$childProperty->getName()] = $contentView->getContent();
$view[$i][$childProperty->getName()] = $contentView->getView();
Expand Down
8 changes: 4 additions & 4 deletions Content/ContentTypeResolver/ImageMapResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class ImageMapResolver implements ContentTypeResolverInterface
/**
* @var ContentResolverInterface
*/
private $resolver;
private $contentResolver;

public static function getContentType(): string
{
Expand All @@ -44,11 +44,11 @@ public static function getContentType(): string
public function __construct(
MediaManagerInterface $mediaManager,
MediaSerializerInterface $mediaSerializer,
ContentResolverInterface $resolver
ContentResolverInterface $contentResolver
) {
$this->mediaManager = $mediaManager;
$this->mediaSerializer = $mediaSerializer;
$this->resolver = $resolver;
$this->contentResolver = $contentResolver;
}

public function resolve($data, PropertyInterface $property, string $locale, array $attributes = []): ContentView
Expand All @@ -72,7 +72,7 @@ public function resolve($data, PropertyInterface $property, string $locale, arra
$key = $childProperty->getName();

$childProperty->setValue($hotspot[$key] ?? null);
$result = $this->resolver->resolve($childProperty->getValue(), $childProperty, $locale, $attributes);
$result = $this->contentResolver->resolve($childProperty->getValue(), $childProperty, $locale, $attributes);
$hotspot[$key] = $result->getContent();
$hotspotView[$key] = $result->getView();
}
Expand Down

0 comments on commit 41ead1c

Please sign in to comment.