| Total Complexity | 2 |
| Total Lines | 36 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 1 | Features | 0 |
| 1 | <?php |
||
| 7 | class AddressBuilder extends QueryBuilder |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * Scope query results to Address's associated with a particular model. |
||
| 11 | * |
||
| 12 | * @param string $addressableType |
||
| 13 | * @param string $operator |
||
| 14 | * @param string $boolean |
||
| 15 | * |
||
| 16 | * @return $this |
||
| 17 | */ |
||
| 18 | public function whereType(string $addressableType, string $operator = '=', string $boolean = 'and') |
||
| 19 | { |
||
| 20 | $this->where('addressable_type', $operator, $addressableType, $boolean); |
||
| 21 | |||
| 22 | return $this; |
||
| 23 | } |
||
| 24 | |||
| 25 | /** |
||
| 26 | * Use a 'wildcard' like search to several attributes for a match. |
||
| 27 | * |
||
| 28 | * @param string $search |
||
| 29 | * |
||
| 30 | * @return $this |
||
| 31 | */ |
||
| 32 | public function whereAddressLike(string $search) |
||
| 43 | } |
||
| 44 | } |
||
| 45 |