| Total Complexity | 11 |
| Total Lines | 137 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 9 | class FindResponse |
||
| 10 | { |
||
| 11 | /** |
||
| 12 | * @var Lawyer[] |
||
| 13 | */ |
||
| 14 | protected $lawyers = []; |
||
| 15 | |||
| 16 | /** |
||
| 17 | * @var Generator|DetailLawyer[] |
||
| 18 | */ |
||
| 19 | protected $detailLawyers; |
||
| 20 | |||
| 21 | /** |
||
| 22 | * @var int |
||
| 23 | */ |
||
| 24 | protected $page = 1; |
||
| 25 | |||
| 26 | /** |
||
| 27 | * @var int |
||
| 28 | */ |
||
| 29 | protected $totalPage = 1; |
||
| 30 | |||
| 31 | /** |
||
| 32 | * @var int |
||
| 33 | */ |
||
| 34 | protected $total = 0; |
||
| 35 | |||
| 36 | /** |
||
| 37 | * @return array |
||
| 38 | */ |
||
| 39 | public function getLawyers(): array |
||
| 40 | { |
||
| 41 | return $this->lawyers; |
||
| 42 | } |
||
| 43 | |||
| 44 | /** |
||
| 45 | * @param array $lawyers |
||
| 46 | * |
||
| 47 | * @return FindResponse |
||
| 48 | */ |
||
| 49 | public function setLawyers(array $lawyers): FindResponse |
||
| 50 | { |
||
| 51 | $this->lawyers = $lawyers; |
||
| 52 | |||
| 53 | return $this; |
||
| 54 | } |
||
| 55 | |||
| 56 | /** |
||
| 57 | * @return int |
||
| 58 | */ |
||
| 59 | public function getPage(): int |
||
| 60 | { |
||
| 61 | return $this->page; |
||
| 62 | } |
||
| 63 | |||
| 64 | /** |
||
| 65 | * @param int $page |
||
| 66 | * |
||
| 67 | * @return FindResponse |
||
| 68 | */ |
||
| 69 | public function setPage(int $page): FindResponse |
||
| 70 | { |
||
| 71 | $this->page = $page; |
||
| 72 | |||
| 73 | return $this; |
||
| 74 | } |
||
| 75 | |||
| 76 | /** |
||
| 77 | * @return int |
||
| 78 | */ |
||
| 79 | public function getTotalPage(): int |
||
| 80 | { |
||
| 81 | return $this->totalPage; |
||
| 82 | } |
||
| 83 | |||
| 84 | /** |
||
| 85 | * @param int $totalPage |
||
| 86 | * |
||
| 87 | * @return FindResponse |
||
| 88 | */ |
||
| 89 | public function setTotalPage(int $totalPage): FindResponse |
||
| 90 | { |
||
| 91 | $this->totalPage = $totalPage; |
||
| 92 | |||
| 93 | return $this; |
||
| 94 | } |
||
| 95 | |||
| 96 | /** |
||
| 97 | * @return int |
||
| 98 | */ |
||
| 99 | public function getTotal(): int |
||
| 100 | { |
||
| 101 | return $this->total; |
||
| 102 | } |
||
| 103 | |||
| 104 | /** |
||
| 105 | * @param int $total |
||
| 106 | * |
||
| 107 | * @return FindResponse |
||
| 108 | */ |
||
| 109 | public function setTotal(int $total): FindResponse |
||
| 110 | { |
||
| 111 | $this->total = $total; |
||
| 112 | |||
| 113 | return $this; |
||
| 114 | } |
||
| 115 | |||
| 116 | /** |
||
| 117 | * @param \SomeWork\Minjust\Entity\Lawyer $lawyer |
||
| 118 | * |
||
| 119 | * @return FindResponse |
||
| 120 | */ |
||
| 121 | public function addLawyer(Lawyer $lawyer): self |
||
| 122 | { |
||
| 123 | $this->lawyers[] = $lawyer; |
||
| 124 | |||
| 125 | return $this; |
||
| 126 | } |
||
| 127 | |||
| 128 | /** |
||
| 129 | * @return Generator|DetailLawyer[] |
||
| 130 | */ |
||
| 131 | public function getDetailLawyers() |
||
| 134 | } |
||
| 135 | |||
| 136 | /** |
||
| 137 | * @param Generator|DetailLawyer[] $detailLawyers |
||
| 138 | * |
||
| 139 | * @return static |
||
| 140 | */ |
||
| 141 | public function setDetailLawyersGenerator(Generator $detailLawyers): self |
||
| 142 | { |
||
| 146 | } |
||
| 147 | } |
||
| 148 |