| Conditions | 2 |
| Paths | 2 |
| Total Lines | 10 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 39 | public function addressLevel($full_settlements = false) |
||
| 40 | { |
||
| 41 | if ($full_settlements == false) { |
||
|
|
|||
| 42 | $this->db = $this->db->andWhere(['address_level' => self::CITY]); |
||
| 43 | } else { |
||
| 44 | $this->db = $this->db->andWhere(['OR' => [['address_level' => self::CITY], ['address_level' => self::SETTLEMENT]]]); |
||
| 45 | } |
||
| 46 | |||
| 47 | return $this; |
||
| 48 | } |
||
| 49 | } |
When comparing two booleans, it is generally considered safer to use the strict comparison operator.