| Conditions | 2 |
| Paths | 2 |
| Total Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 27 | public function whitelist($institution) |
||
| 28 | { |
||
| 29 | $sql = "INSERT INTO whitelist_entry (`institution`) VALUES (:institution);"; |
||
| 30 | $stmt = $this->connection->prepare($sql); |
||
| 31 | $data = ['institution' => $institution]; |
||
| 32 | if ($stmt->execute($data)) { |
||
| 33 | return $data; |
||
| 34 | } |
||
| 35 | |||
| 36 | throw new Exception('Unable add the institution to the whitelist'); |
||
| 37 | } |
||
| 38 | } |
||
| 39 |