Skip to content

Commit

Permalink
Fix review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
andrerom committed Nov 16, 2018
1 parent f9259df commit fa9ee61
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 10 deletions.
4 changes: 2 additions & 2 deletions eZ/Publish/Core/Persistence/Legacy/Content/Type/Gateway.php
Expand Up @@ -186,13 +186,13 @@ abstract public function updateFieldDefinition(
abstract public function updateType($typeId, $status, UpdateStruct $updateStruct);

/**
* Loads an array with data about several Types in defined status..
* Loads an array with data about several Types in defined status.
*
* @param array $typeIds
*
* @return array Data rows.
*/
abstract public function loadTypesDataList(array $typeIds): array;
abstract public function loadTypesListData(array $typeIds): array;

/**
* Loads an array with data about $typeId in $status.
Expand Down
Expand Up @@ -870,7 +870,7 @@ public function updateType($typeId, $status, UpdateStruct $updateStruct)
$this->insertTypeNameData($typeId, $status, $updateStruct->name);
}

public function loadTypesDataList(array $typeIds): array
public function loadTypesListData(array $typeIds): array
{
$q = $this->getLoadTypeQueryBuilder();
$q
Expand Down
Expand Up @@ -350,10 +350,10 @@ public function updateType($typeId, $status, UpdateStruct $updateStruct)
}
}

public function loadTypesDataList(array $typeIds): array
public function loadTypesListData(array $typeIds): array
{
try {
return $this->innerGateway->loadTypesDataList($typeIds);
return $this->innerGateway->loadTypesListData($typeIds);
} catch (PDOException | DBALException $e) {
throw new RuntimeException('Database error', 0, $e);
}
Expand Down
Expand Up @@ -190,7 +190,7 @@ public function loadContentTypes($groupId, $status = 0)
public function loadContentTypeList(array $contentTypeIds): array
{
return $this->mapper->extractTypesFromRows(
$this->contentTypeGateway->loadTypesDataList($contentTypeIds),
$this->contentTypeGateway->loadTypesListData($contentTypeIds),
true
);
}
Expand Down
Expand Up @@ -307,7 +307,7 @@ public function testLoadContentTypeList(): void
{
$gatewayMock = $this->getGatewayMock();
$gatewayMock->expects($this->once())
->method('loadTypesDataList')
->method('loadTypesListData')
->with($this->equalTo([23, 24]))
->willReturn([]);

Expand Down
5 changes: 3 additions & 2 deletions eZ/Publish/Core/Repository/Helper/DomainMapper.php
Expand Up @@ -73,7 +73,7 @@ class DomainMapper
protected $contentLanguageHandler;

/**
* @var FieldTypeRegistry
* @var \eZ\Publish\Core\Repository\Helper\FieldTypeRegistry
*/
protected $fieldTypeRegistry;

Expand All @@ -83,8 +83,9 @@ class DomainMapper
* @param \eZ\Publish\SPI\Persistence\Content\Handler $contentHandler
* @param \eZ\Publish\SPI\Persistence\Content\Location\Handler $locationHandler
* @param \eZ\Publish\SPI\Persistence\Content\Type\Handler $contentTypeHandler
* @param \eZ\Publish\Core\Repository\Helper\ContentTypeDomainMapper $contentTypeDomainMapper
* @param \eZ\Publish\SPI\Persistence\Content\Language\Handler $contentLanguageHandler
* @param FieldTypeRegistry $fieldTypeRegistry
* @param \eZ\Publish\Core\Repository\Helper\FieldTypeRegistry $fieldTypeRegistry
*/
public function __construct(
ContentHandler $contentHandler,
Expand Down
2 changes: 1 addition & 1 deletion eZ/Publish/SPI/Persistence/Content/Type/Handler.php
Expand Up @@ -87,7 +87,7 @@ public function loadContentTypes($groupId, $status = Type::STATUS_DEFINED);
* Missing items (NotFound) will be missing from the array and not cause an exception, it's up
* to calling logic to determine if this should cause exception or not.
*
* @param mixed[] $contentTypeIds
* @param array $contentTypeIds
*
* @return \eZ\Publish\SPI\Persistence\Content\Type[]
*/
Expand Down

0 comments on commit fa9ee61

Please sign in to comment.