Skip to content

Commit

Permalink
Merge pull request #50 from amocrm/hotfix/issue#49
Browse files Browse the repository at this point in the history
fix filters
  • Loading branch information
bessudnov authored Jul 3, 2020
2 parents ab50331 + cb4d404 commit 4c7f614
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 12 deletions.
3 changes: 2 additions & 1 deletion src/AmoCRM/Filters/CompaniesFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@

namespace AmoCRM\Filters;

use AmoCRM\Filters\Interfaces\HasOrderInterface;
use AmoCRM\Filters\Interfaces\HasPagesInterface;
use AmoCRM\Filters\Traits\ArrayOrNumericFilterTrait;
use AmoCRM\Filters\Traits\ArrayOrStringFilterTrait;
use AmoCRM\Filters\Traits\OrderTrait;
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;
Expand Down
3 changes: 2 additions & 1 deletion src/AmoCRM/Filters/ContactsFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@

namespace AmoCRM\Filters;

use AmoCRM\Filters\Interfaces\HasOrderInterface;
use AmoCRM\Filters\Interfaces\HasPagesInterface;
use AmoCRM\Filters\Traits\ArrayOrNumericFilterTrait;
use AmoCRM\Filters\Traits\ArrayOrStringFilterTrait;
use AmoCRM\Filters\Traits\OrderTrait;
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;
Expand Down
3 changes: 2 additions & 1 deletion src/AmoCRM/Filters/CustomersFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@

namespace AmoCRM\Filters;

use AmoCRM\Filters\Interfaces\HasOrderInterface;
use AmoCRM\Filters\Interfaces\HasPagesInterface;
use AmoCRM\Filters\Traits\ArrayOrNumericFilterTrait;
use AmoCRM\Filters\Traits\ArrayOrStringFilterTrait;
use AmoCRM\Filters\Traits\OrderTrait;
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;
Expand Down
8 changes: 3 additions & 5 deletions src/AmoCRM/Filters/Interfaces/HasOrderInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

namespace AmoCRM\Filters\Interfaces;

use AmoCRM\Filters\Traits\PagesFilterTrait;

/**
* Интерфейс для фильтров, которые поддерживают постраничную навигацию
* @package AmoCRM\Filters\Interfaces
Expand All @@ -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;
}
3 changes: 2 additions & 1 deletion src/AmoCRM/Filters/LeadsFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@

namespace AmoCRM\Filters;

use AmoCRM\Filters\Interfaces\HasOrderInterface;
use AmoCRM\Filters\Interfaces\HasPagesInterface;
use AmoCRM\Filters\Traits\ArrayOrNumericFilterTrait;
use AmoCRM\Filters\Traits\ArrayOrStringFilterTrait;
use AmoCRM\Filters\Traits\OrderTrait;
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;
Expand Down
3 changes: 2 additions & 1 deletion src/AmoCRM/Filters/NotesFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 3 additions & 1 deletion src/AmoCRM/Filters/TasksFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
3 changes: 2 additions & 1 deletion src/AmoCRM/Filters/UnsortedFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 4c7f614

Please sign in to comment.