| Conditions | 5 |
| Paths | 16 |
| Total Lines | 23 |
| Code Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 16 |
| CRAP Score | 5 |
| Changes | 0 | ||
| 1 | <?php |
||
| 46 | 2 | public function getTokens($identifiers) |
|
| 47 | { |
||
| 48 | 2 | $this->query->from($this->table); |
|
| 49 | |||
| 50 | 2 | $select = []; |
|
| 51 | 2 | if ($this->apns !== null) { |
|
| 52 | 2 | $select[] = $this->apns; |
|
| 53 | 2 | } |
|
| 54 | |||
| 55 | 2 | if ($this->gcm !== null) { |
|
| 56 | 1 | $select[] = $this->gcm; |
|
| 57 | 1 | } |
|
| 58 | |||
| 59 | 2 | if (!empty($select)) { |
|
| 60 | 2 | $this->query->select($select); |
|
| 61 | 2 | } |
|
| 62 | |||
| 63 | 2 | if (!empty($identifiers)) { |
|
| 64 | 2 | $this->query->andWhere([$this->identifier => $identifiers]); |
|
| 65 | 2 | } |
|
| 66 | |||
| 67 | 2 | return $this->query->all(); |
|
| 68 | } |
||
| 69 | |||
| 84 | } |