| Conditions | 4 |
| Paths | 3 |
| Total Lines | 11 |
| Code Lines | 4 |
| Lines | 0 |
| Ratio | 0 % |
| 1 | <?php |
||
| 11 | private static function countEntries(string $table_name, bool $false_on_error = false) { |
||
| 12 | |||
| 13 | if (!(DB::select($table_name, 'COUNT(id) as count') && (DB::last()->rows === 1))) { |
||
| 14 | |||
| 15 | return (!$false_on_error ? 0 : false); |
||
| 16 | } |
||
| 17 | |||
| 18 | # ------------------------ |
||
| 19 | |||
| 20 | return intval(DB::last()->row()['count']); |
||
| 21 | } |
||
| 22 | |||
| 68 |