| Conditions | 3 |
| Paths | 2 |
| Total Lines | 15 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 26 | public function findPublicKey($threemaId) |
||
| 27 | { |
||
| 28 | /** @var mixed $result result of SQL query */ |
||
| 29 | $result = $this->_getDb()->fetchRow( |
||
| 30 | $this->_getDb()->select() |
||
| 31 | ->from(self::DB_TABLE) |
||
| 32 | ->where('threema_id = ?', $threemaId) |
||
| 33 | ); |
||
| 34 | |||
| 35 | if (is_array($result) && array_key_exists('public_key', $result)) { |
||
| 36 | return (string) $result['public_key']; |
||
| 37 | } |
||
| 38 | |||
| 39 | return null; |
||
| 40 | } |
||
| 41 | } |
||
| 42 |