| @@ 130-138 (lines=9) @@ | ||
| 127 | * @param string $type |
|
| 128 | * @return DomainSearch |
|
| 129 | */ |
|
| 130 | public function type(string $type): self |
|
| 131 | { |
|
| 132 | if (!in_array($type, ['generic', 'personal'])) { |
|
| 133 | throw new InvalidRequestException('Type must be either "generic" or "personal".'); |
|
| 134 | } |
|
| 135 | $this->type = $type; |
|
| 136 | ||
| 137 | return $this; |
|
| 138 | } |
|
| 139 | ||
| 140 | /** |
|
| 141 | * Set the selected seniority levels to include in search |
|
| @@ 71-79 (lines=9) @@ | ||
| 68 | * @param string $type |
|
| 69 | * @return DomainSearch |
|
| 70 | */ |
|
| 71 | public function type(string $type): self |
|
| 72 | { |
|
| 73 | if (!in_array($type, ['generic', 'personal'])) { |
|
| 74 | throw new InvalidRequestException('Type must be either "generic" or "personal".'); |
|
| 75 | } |
|
| 76 | $this->type = $type; |
|
| 77 | ||
| 78 | return $this; |
|
| 79 | } |
|
| 80 | ||
| 81 | public function make() |
|
| 82 | { |
|