Skip to content

Commit

Permalink
FIX typo
Browse files Browse the repository at this point in the history
  • Loading branch information
phoenix128 committed Feb 16, 2018
1 parent 9f40806 commit 1bf2ac4
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Model/Monkey/DddCqrs.php
Original file line number Diff line number Diff line change
Expand Up @@ -724,7 +724,7 @@ private function generateRepositoryTest()
'namespace' => $this->classes['test_repository']['info']['namespace'],
'class' => $this->classes['test_repository']['info']['class_name'],
'test_wrapper' => $this->classes['test_wrapper']['class'],
'test_wrapper_class' => $this->classes['test_wrapper']['info']['class'],
'test_wrapper_class' => $this->classes['test_wrapper']['info']['class_name'],
'repository_interface' => $this->classes['repository_interface']['class'],
'data_interface' => $this->classes['data_interface']['class'],
'entity_var' => $this->entityVar,
Expand Down
2 changes: 1 addition & 1 deletion etc/module.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
-->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
<module name="MSP_CodeMonkey" setup_version="1.2.8">
<module name="MSP_CodeMonkey" setup_version="1.2.9">
<sequence>
<module name="MSP_Common"/>

Expand Down
1 change: 1 addition & 0 deletions templates/ddd-cqrs/Api/RepositoryInterface.index.template
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@
* Get by %column_name% value
* @param %data_type% $%var_name%
* @return %data_interface%
* @throws \Magento\Framework\Exception\NoSuchEntityException
*/
public function getBy%column_name%(%data_type% $%var_name%): %data_interface%;
6 changes: 4 additions & 2 deletions templates/ddd-cqrs/Model/Model/Command/GetList.template
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,10 @@ class GetList implements GetListInterface
$sortOrders = $searchCriteria->getSortOrders();
if ($sortOrders) {
foreach ($sortOrders as $sortOrder) {
$isAscending = $sortOrder->getDirection() == \Magento\Framework\Api\SortOrder::SORT_ASC;
$collection->addOrder($sortOrder->getField(), $isAscending ? 'ASC' : 'DESC');
if ($sortOrder->getField()) {
$isAscending = $sortOrder->getDirection() == \Magento\Framework\Api\SortOrder::SORT_ASC;
$collection->addOrder($sortOrder->getField(), $isAscending ? 'ASC' : 'DESC');
}
}
}
}
Expand Down

0 comments on commit 1bf2ac4

Please sign in to comment.