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