diff --git a/src/AmoCRM/Filters/CompaniesFilter.php b/src/AmoCRM/Filters/CompaniesFilter.php index 5c838b2e..d75ef739 100755 --- a/src/AmoCRM/Filters/CompaniesFilter.php +++ b/src/AmoCRM/Filters/CompaniesFilter.php @@ -2,6 +2,7 @@ namespace AmoCRM\Filters; +use AmoCRM\Filters\Interfaces\HasOrderInterface; use AmoCRM\Filters\Interfaces\HasPagesInterface; use AmoCRM\Filters\Traits\ArrayOrNumericFilterTrait; use AmoCRM\Filters\Traits\ArrayOrStringFilterTrait; @@ -9,7 +10,7 @@ use AmoCRM\Filters\Traits\PagesFilterTrait; use AmoCRM\Filters\Traits\IntOrIntRangeFilterTrait; -class CompaniesFilter extends BaseEntityFilter implements HasPagesInterface +class CompaniesFilter extends BaseEntityFilter implements HasPagesInterface, HasOrderInterface { use OrderTrait; use PagesFilterTrait; diff --git a/src/AmoCRM/Filters/ContactsFilter.php b/src/AmoCRM/Filters/ContactsFilter.php index fa158c09..f454f147 100755 --- a/src/AmoCRM/Filters/ContactsFilter.php +++ b/src/AmoCRM/Filters/ContactsFilter.php @@ -2,6 +2,7 @@ namespace AmoCRM\Filters; +use AmoCRM\Filters\Interfaces\HasOrderInterface; use AmoCRM\Filters\Interfaces\HasPagesInterface; use AmoCRM\Filters\Traits\ArrayOrNumericFilterTrait; use AmoCRM\Filters\Traits\ArrayOrStringFilterTrait; @@ -9,7 +10,7 @@ use AmoCRM\Filters\Traits\PagesFilterTrait; use AmoCRM\Filters\Traits\IntOrIntRangeFilterTrait; -class ContactsFilter extends BaseEntityFilter implements HasPagesInterface +class ContactsFilter extends BaseEntityFilter implements HasPagesInterface, HasOrderInterface { use OrderTrait; use PagesFilterTrait; diff --git a/src/AmoCRM/Filters/CustomersFilter.php b/src/AmoCRM/Filters/CustomersFilter.php index 2f15cfbf..85f2c95d 100755 --- a/src/AmoCRM/Filters/CustomersFilter.php +++ b/src/AmoCRM/Filters/CustomersFilter.php @@ -2,6 +2,7 @@ namespace AmoCRM\Filters; +use AmoCRM\Filters\Interfaces\HasOrderInterface; use AmoCRM\Filters\Interfaces\HasPagesInterface; use AmoCRM\Filters\Traits\ArrayOrNumericFilterTrait; use AmoCRM\Filters\Traits\ArrayOrStringFilterTrait; @@ -9,7 +10,7 @@ use AmoCRM\Filters\Traits\PagesFilterTrait; use AmoCRM\Filters\Traits\IntOrIntRangeFilterTrait; -class CustomersFilter extends BaseEntityFilter implements HasPagesInterface +class CustomersFilter extends BaseEntityFilter implements HasPagesInterface, HasOrderInterface { use OrderTrait; use PagesFilterTrait; diff --git a/src/AmoCRM/Filters/Interfaces/HasOrderInterface.php b/src/AmoCRM/Filters/Interfaces/HasOrderInterface.php index 59e9286c..606d41dc 100755 --- a/src/AmoCRM/Filters/Interfaces/HasOrderInterface.php +++ b/src/AmoCRM/Filters/Interfaces/HasOrderInterface.php @@ -2,8 +2,6 @@ namespace AmoCRM\Filters\Interfaces; -use AmoCRM\Filters\Traits\PagesFilterTrait; - /** * Интерфейс для фильтров, которые поддерживают постраничную навигацию * @package AmoCRM\Filters\Interfaces @@ -19,10 +17,10 @@ interface HasOrderInterface * * @return $this */ - public function setOrder(string $field, string $direction = self::SORT_ASC): self; + public function setOrder(string $field, string $direction = self::SORT_ASC); /** - * @return array + * @return null|array */ - public function getOrder(): array; + public function getOrder(): ?array; } diff --git a/src/AmoCRM/Filters/LeadsFilter.php b/src/AmoCRM/Filters/LeadsFilter.php index 6df0ed48..dd8db039 100755 --- a/src/AmoCRM/Filters/LeadsFilter.php +++ b/src/AmoCRM/Filters/LeadsFilter.php @@ -2,6 +2,7 @@ namespace AmoCRM\Filters; +use AmoCRM\Filters\Interfaces\HasOrderInterface; use AmoCRM\Filters\Interfaces\HasPagesInterface; use AmoCRM\Filters\Traits\ArrayOrNumericFilterTrait; use AmoCRM\Filters\Traits\ArrayOrStringFilterTrait; @@ -9,7 +10,7 @@ use AmoCRM\Filters\Traits\PagesFilterTrait; use AmoCRM\Filters\Traits\IntOrIntRangeFilterTrait; -class LeadsFilter extends BaseEntityFilter implements HasPagesInterface +class LeadsFilter extends BaseEntityFilter implements HasPagesInterface, HasOrderInterface { use OrderTrait; use PagesFilterTrait; diff --git a/src/AmoCRM/Filters/NotesFilter.php b/src/AmoCRM/Filters/NotesFilter.php index dde19995..7efe096d 100755 --- a/src/AmoCRM/Filters/NotesFilter.php +++ b/src/AmoCRM/Filters/NotesFilter.php @@ -2,13 +2,14 @@ namespace AmoCRM\Filters; +use AmoCRM\Filters\Interfaces\HasOrderInterface; use AmoCRM\Filters\Interfaces\HasPagesInterface; use AmoCRM\Filters\Traits\ArrayOrNumericFilterTrait; use AmoCRM\Filters\Traits\OrderTrait; use AmoCRM\Filters\Traits\PagesFilterTrait; use AmoCRM\Filters\Traits\IntOrIntRangeFilterTrait; -class NotesFilter extends BaseEntityFilter implements HasPagesInterface +class NotesFilter extends BaseEntityFilter implements HasPagesInterface, HasOrderInterface { use OrderTrait; use PagesFilterTrait; diff --git a/src/AmoCRM/Filters/TasksFilter.php b/src/AmoCRM/Filters/TasksFilter.php index 132bae28..0f6585fd 100644 --- a/src/AmoCRM/Filters/TasksFilter.php +++ b/src/AmoCRM/Filters/TasksFilter.php @@ -2,12 +2,14 @@ namespace AmoCRM\Filters; +use AmoCRM\Filters\Interfaces\HasOrderInterface; +use AmoCRM\Filters\Interfaces\HasPagesInterface; use AmoCRM\Filters\Traits\ArrayOrNumericFilterTrait; use AmoCRM\Filters\Traits\OrderTrait; use AmoCRM\Filters\Traits\PagesFilterTrait; use AmoCRM\Filters\Traits\IntOrIntRangeFilterTrait; -class TasksFilter +class TasksFilter extends BaseEntityFilter implements HasPagesInterface, HasOrderInterface { use OrderTrait; use PagesFilterTrait; diff --git a/src/AmoCRM/Filters/UnsortedFilter.php b/src/AmoCRM/Filters/UnsortedFilter.php index 488fc1eb..13257a34 100755 --- a/src/AmoCRM/Filters/UnsortedFilter.php +++ b/src/AmoCRM/Filters/UnsortedFilter.php @@ -2,12 +2,13 @@ namespace AmoCRM\Filters; +use AmoCRM\Filters\Interfaces\HasOrderInterface; use AmoCRM\Filters\Interfaces\HasPagesInterface; use AmoCRM\Filters\Traits\ArrayOrStringFilterTrait; use AmoCRM\Filters\Traits\OrderTrait; use AmoCRM\Filters\Traits\PagesFilterTrait; -class UnsortedFilter extends BaseEntityFilter implements HasPagesInterface +class UnsortedFilter extends BaseEntityFilter implements HasPagesInterface, HasOrderInterface { use PagesFilterTrait; use OrderTrait;