Skip to content

Commit

Permalink
Merge remote-tracking branch 'remotes/mainline_ce/develop' into MAGET…
Browse files Browse the repository at this point in the history
…WO-32996
  • Loading branch information
Pechenushko committed Jul 9, 2015
2 parents f5b0c4a + 1988a1b commit c2b7723
Show file tree
Hide file tree
Showing 107 changed files with 218 additions and 192 deletions.
2 changes: 1 addition & 1 deletion app/code/Magento/Backend/Model/Search/Customer.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ public function load()
->setValue($this->getQuery() . '%')
->create();
}
$this->searchCriteriaBuilder->addFilter($filters);
$this->searchCriteriaBuilder->addFilters($filters);
$searchCriteria = $this->searchCriteriaBuilder->create();
$searchResults = $this->customerRepository->getList($searchCriteria);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@ public function getItems();
* @param \Magento\Catalog\Api\Data\CategoryAttributeInterface[] $items
* @return $this
*/
public function setItems(array $items = null);
public function setItems(array $items);
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@ public function getItems();
* @param \Magento\Catalog\Api\Data\ProductAttributeInterface[] $items
* @return $this
*/
public function setItems(array $items = null);
public function setItems(array $items);
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@ public function getItems();
* @param \Magento\Catalog\Api\Data\ProductInterface[] $items
* @return $this
*/
public function setItems(array $items = null);
public function setItems(array $items);
}
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public function getCustomAttributesMetadata($dataObjectClassName = null)
$defaultAttributeSetId = $this->eavConfig
->getEntityType(\Magento\Catalog\Api\Data\CategoryAttributeInterface::ENTITY_TYPE_CODE)
->getDefaultAttributeSetId();
$searchCriteria = $this->searchCriteriaBuilder->addFilter(
$searchCriteria = $this->searchCriteriaBuilder->addFilters(
[
$this->filterBuilder
->setField('attribute_set_id')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ public function getCustomAttributesMetadata($dataObjectClassName = null)
$defaultAttributeSetId = $this->eavConfig
->getEntityType(\Magento\Catalog\Api\Data\ProductAttributeInterface::ENTITY_TYPE_CODE)
->getDefaultAttributeSetId();
$searchCriteria = $this->searchCriteriaBuilder->addFilter(
$searchCriteria = $this->searchCriteriaBuilder->addFilters(
[
$this->filterBuilder
->setField('attribute_set_id')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public function save(\Magento\Eav\Api\Data\AttributeSetInterface $attributeSet)
*/
public function getList(\Magento\Framework\Api\SearchCriteriaInterface $searchCriteria)
{
$this->searchCriteriaBuilder->addFilter(
$this->searchCriteriaBuilder->addFilters(
[
$this->filterBuilder
->setField('entity_type_code')
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/Catalog/Model/ProductRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -652,7 +652,7 @@ public function getList(\Magento\Framework\Api\SearchCriteriaInterface $searchCr
$defaultAttributeSetId = $this->eavConfig
->getEntityType(\Magento\Catalog\Api\Data\ProductAttributeInterface::ENTITY_TYPE_CODE)
->getDefaultAttributeSetId();
$extendedSearchCriteria = $this->searchCriteriaBuilder->addFilter(
$extendedSearchCriteria = $this->searchCriteriaBuilder->addFilters(
[
$this->filterBuilder
->setField('attribute_set_id')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ public function testGetCustomAttributesMetadata()
3
)->willReturnSelf();
$this->filterBuilderMock->expects($this->once())->method('create')->willReturn($filterMock);
$this->searchBuilderMock->expects($this->once())->method('addFilter')->with([$filterMock])->willReturnSelf();
$this->searchBuilderMock->expects($this->once())->method('addFilters')->with([$filterMock])->willReturnSelf();
$searchCriteriaMock = $this->getMock('Magento\Framework\Api\SearchCriteria', [], [], '', false);
$this->searchBuilderMock->expects($this->once())->method('create')->willReturn($searchCriteriaMock);
$itemMock = $this->getMock('Magento\Framework\Object', [], [], '', false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ public function testGetCustomAttributesMetadata()
->willReturnSelf();
$this->filterBuilderMock->expects($this->once())->method('create')->willReturn($filterMock);
$this->searchCriteriaBuilderMock->expects($this->once())
->method('addFilter')
->method('addFilters')
->with([$filterMock])
->willReturnSelf();
$searchCriteriaMock = $this->getMock('Magento\Framework\Api\SearchCriteria', [], [], '', false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ public function testGetList()
$this->filterBuilderMock->expects($this->once())->method('create')->willReturn($filterMock);

$this->searchCriteriaBuilderMock->expects($this->once())
->method('addFilter')
->method('addFilters')
->with([$filterMock])
->willReturnSelf();
$this->searchCriteriaBuilderMock->expects($this->once())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -573,7 +573,7 @@ public function testGetList()
$this->filterBuilderMock->expects($this->once())->method('setValue')
->with(4)
->willReturn($this->filterBuilderMock);
$this->searchCriteriaBuilderMock->expects($this->once())->method('addFilter')->with([$filterMock])
$this->searchCriteriaBuilderMock->expects($this->once())->method('addFilters')->with([$filterMock])
->willReturn($searchCriteriaBuilderMock);
$searchCriteriaBuilderMock->expects($this->once())->method('create')->willReturn($extendedSearchCriteriaMock);
$this->metadataServiceMock->expects($this->once())->method('getList')->with($extendedSearchCriteriaMock)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<block class="Magento\Framework\View\Element\RendererList" name="category.product.type.details.renderers" as="details.renderers">
<block class="Magento\Framework\View\Element\Template" as="default"/>
</block>
<block class="Magento\Catalog\Block\Product\ProductList\Toolbar" name="product_list_toolbar" template="product/list/toolbar.phtml">
<block class="Magento\Catalog\Block\Product\ProductList\Toolbar" name="product_list_toolbar" template="Magento_Catalog::product/list/toolbar.phtml">
<block class="Magento\Theme\Block\Html\Pager" name="product_list_toolbar_pager"/>
<!-- The following code shows how to set your own pager increments -->
<!--
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,5 @@ public function getItems();
* @param \Magento\CatalogInventory\Api\Data\StockInterface[] $items
* @return $this
*/
public function setItems(array $items = null);
public function setItems(array $items);
}
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public function getItems();
* @param \Magento\CatalogInventory\Api\Data\StockItemInterface[] $items
* @return $this
*/
public function setItems(array $items = null);
public function setItems(array $items);

/**
* Get search criteria.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public function getItems();
* @param \Magento\CatalogInventory\Api\Data\StockStatusInterface[] $items
* @return $this
*/
public function setItems(array $items = null);
public function setItems(array $items);

/**
* Get search criteria.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,5 @@ public function getItems();
* @param \Magento\Cms\Api\Data\BlockInterface[] $items
* @return $this
*/
public function setItems(array $items = null);
public function setItems(array $items);
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,5 @@ public function getItems();
* @param \Magento\Cms\Api\Data\PageInterface[] $items
* @return $this
*/
public function setItems(array $items = null);
public function setItems(array $items);
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,5 @@ public function getItems();
* @param \Magento\Customer\Api\Data\AddressInterface[] $items
* @return $this
*/
public function setItems(array $items = null);
public function setItems(array $items);
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,5 @@ public function getItems();
* @param \Magento\Customer\Api\Data\CustomerInterface[] $items
* @return $this
*/
public function setItems(array $items = null);
public function setItems(array $items);
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,5 @@ public function getItems();
* @param \Magento\Customer\Api\Data\GroupInterface[] $items
* @return $this
*/
public function setItems(array $items = null);
public function setItems(array $items);
}
4 changes: 2 additions & 2 deletions app/code/Magento/Customer/Model/GroupManagement.php
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,8 @@ public function getLoggedInGroups()
->setValue(self::CUST_GROUP_ALL)
->create();
$searchCriteria = $this->searchCriteriaBuilder
->addFilter($notLoggedInFilter)
->addFilter($groupAll)
->addFilters($notLoggedInFilter)
->addFilters($groupAll)
->create();
return $this->groupRepository->getList($searchCriteria)->getItems();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public function testGetSearchCriteriaImplicitEq()
->setCurrentPage(1)
->setPageSize(false)
->addSortOrder($sortOrder)
->addFilter(
->addFilters(
[$this->filterBuilder->setField('name')->setConditionType('eq')->setValue('Magento')->create()]
)->create();

Expand Down Expand Up @@ -119,7 +119,7 @@ public function testGetSearchCriteriaOneField()
->setCurrentPage(1)
->setPageSize(0)
->addSortOrder($sortOrder)
->addFilter([$filter])
->addFilters([$filter])
->create();

// Verifies that the search criteria Data Object created by the serviceCollection matches expected
Expand Down Expand Up @@ -150,7 +150,7 @@ public function testGetSearchCriteriaOr()
->setCurrentPage(1)
->setPageSize(0)
->addSortOrder($sortOrder)
->addFilter(
->addFilters(
[
$this->filterBuilder->setField($fieldA)->setConditionType('eq')->setValue($value)->create(),
$this->filterBuilder->setField($fieldB)->setConditionType('eq')->setValue($value)->create(),
Expand Down Expand Up @@ -186,13 +186,13 @@ public function testGetSearchCriteriaAnd()
->setCurrentPage(1)
->setPageSize(0)
->addSortOrder($sortOrder)
->addFilter(
->addFilters(
[
$this->filterBuilder->setField($fieldA)->setConditionType('gt')
->setValue($value)->create(),
]
)
->addFilter(
->addFilters(
[
$this->filterBuilder->setField($fieldB)->setConditionType('gt')
->setValue($value)->create(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@ public function getItems();
* @param \Magento\Eav\Api\Data\AttributeGroupInterface[] $items
* @return $this
*/
public function setItems(array $items = null);
public function setItems(array $items);
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@ public function getItems();
* @param \Magento\Eav\Api\Data\AttributeInterface[] $items
* @return $this
*/
public function setItems(array $items = null);
public function setItems(array $items);
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@ public function getItems();
* @param \Magento\Eav\Api\Data\AttributeSetInterface[] $items
* @return $this
*/
public function setItems(array $items = null);
public function setItems(array $items);
}
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ public function getAddress()
->setConditionType('eq')
->create();
$addresses = (array)($this->addressRepository->getList(
$this->searchCriteriaBuilder->addFilter([$filter])->create()
$this->searchCriteriaBuilder->addFilters([$filter])->create()
)->getItems());
} catch (NoSuchEntityException $e) {
return [];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public function execute()
$filter = $this->filterBuilder->setField('parent_id')->setValue($this->_getCheckout()->getCustomer()->getId())
->setConditionType('eq')->create();
$addresses = (array)($this->addressRepository->getList(
$this->searchCriteriaBuilder->addFilter([$filter])->create()
$this->searchCriteriaBuilder->addFilters([$filter])->create()
)->getItems());

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -878,7 +878,7 @@ private function getDefaultAddressByDataKey($key, $defaultAddressIdFromCustomer)
->setConditionType('eq')
->create();
$addresses = (array)($this->addressRepository->getList(
$this->searchCriteriaBuilder->addFilter([$filter])->create()
$this->searchCriteriaBuilder->addFilters([$filter])->create()
)->getItems());
if ($addresses) {
$address = reset($addresses);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ public function testGetAddress()
$this->filterBuilderMock->expects($this->once())->method('create')->willReturn($this->filterMock);
$this->searchCriteriaBuilderMock
->expects($this->once())
->method('addFilter')
->method('addFilters')
->with([$this->filterMock])
->willReturnSelf();
$this->searchCriteriaBuilderMock
Expand Down Expand Up @@ -176,7 +176,7 @@ public function testGetAddressWhenItNotExistInCustomer()
$this->filterBuilderMock->expects($this->once())->method('create')->willReturn($this->filterMock);
$this->searchCriteriaBuilderMock
->expects($this->once())
->method('addFilter')
->method('addFilters')
->with([$this->filterMock])
->willReturnSelf();
$this->searchCriteriaBuilderMock
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ private function mockCustomerAddressRepository($customerId, array $addresses)
$this->filterBuilderMock->expects($this->once())->method('create')->willReturn($filterMock);

$searchCriteriaMock = $this->getMock('Magento\Framework\Api\SearchCriteria', [], [], '', false);
$this->criteriaBuilderMock->expects($this->once())->method('addFilter')->with([$filterMock])->willReturnSelf();
$this->criteriaBuilderMock->expects($this->once())->method('addFilters')->with([$filterMock])->willReturnSelf();
$this->criteriaBuilderMock->expects($this->once())->method('create')->willReturn($searchCriteriaMock);

$searchResultMock = $this->getMock('Magento\Customer\Api\Data\AddressSearchResultsInterface');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ public function testSetShippingItemsInformation()
$this->filterBuilderMock->expects($this->atLeastOnce())->method('create')->willReturnSelf();

$searchCriteriaMock = $this->getMock('\Magento\Framework\Api\SearchCriteria', [], [], '', false);
$this->searchCriteriaBuilderMock->expects($this->atLeastOnce())->method('addFilter')->willReturnSelf();
$this->searchCriteriaBuilderMock->expects($this->atLeastOnce())->method('addFilters')->willReturnSelf();
$this->searchCriteriaBuilderMock->expects($this->atLeastOnce())->method('create')
->willReturn($searchCriteriaMock);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public function getItems();
* @param \Magento\Quote\Api\Data\CartInterface[] $items
* @return $this
*/
public function setItems(array $items = null);
public function setItems(array $items);

/**
* Get search criteria.
Expand All @@ -50,7 +50,7 @@ public function getSearchCriteria();
* @param \Magento\Framework\Api\SearchCriteriaInterface $searchCriteria
* @return $this
*/
public function setSearchCriteria(\Magento\Framework\Api\SearchCriteriaInterface $searchCriteria = null);
public function setSearchCriteria(\Magento\Framework\Api\SearchCriteriaInterface $searchCriteria);

/**
* Get total count.
Expand Down
4 changes: 2 additions & 2 deletions app/code/Magento/Quote/Model/Quote.php
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ class Quote extends AbstractExtensibleModel implements \Magento\Quote\Api\Data\C
*
* @var \Magento\Framework\Api\SearchCriteriaBuilder
*/
protected $criteriaBuilder;
protected $searchCriteriaBuilder;

/**
* Filter builder
Expand Down Expand Up @@ -421,7 +421,7 @@ public function __construct(
$this->_quotePaymentCollectionFactory = $quotePaymentCollectionFactory;
$this->_objectCopyService = $objectCopyService;
$this->addressRepository = $addressRepository;
$this->criteriaBuilder = $criteriaBuilder;
$this->searchCriteriaBuilder = $criteriaBuilder;
$this->filterBuilder = $filterBuilder;
$this->stockRegistry = $stockRegistry;
$this->itemProcessor = $itemProcessor;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,5 @@ public function getItems();
* @param \Magento\Sales\Api\Data\CreditmemoCommentInterface[] $items
* @return $this
*/
public function setItems(array $items = null);
public function setItems(array $items);
}
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,5 @@ public function getItems();
* @param \Magento\Sales\Api\Data\CreditmemoItemInterface[] $items
* @return $this
*/
public function setItems(array $items = null);
public function setItems(array $items);
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@ public function getItems();
* @param \Magento\Sales\Api\Data\CreditmemoInterface[] $items
* @return $this
*/
public function setItems(array $items = null);
public function setItems(array $items);
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,5 @@ public function getItems();
* @param \Magento\Sales\Api\Data\InvoiceCommentInterface[] $items
* @return $this
*/
public function setItems(array $items = null);
public function setItems(array $items);
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,5 @@ public function getItems();
* @param \Magento\Sales\Api\Data\InvoiceItemInterface[] $items
* @return $this
*/
public function setItems(array $items = null);
public function setItems(array $items);
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,5 @@ public function getItems();
* @param \Magento\Sales\Api\Data\InvoiceInterface[] $items
* @return $this
*/
public function setItems(array $items = null);
public function setItems(array $items);
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@ public function getItems();
* @param \Magento\Sales\Api\Data\OrderAddressInterface[] $items
* @return $this
*/
public function setItems(array $items = null);
public function setItems(array $items);
}
Loading

0 comments on commit c2b7723

Please sign in to comment.