| Conditions | 2 |
| Paths | 2 |
| Total Lines | 11 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 17 | function askForFlexiBeeID($type = 'invoice') |
||
| 18 | { |
||
| 19 | $invoiceID = null; |
||
|
|
|||
| 20 | echo "Please enter $type ID:"; |
||
| 21 | $input = fopen("php://stdin", "r"); |
||
| 22 | $invoiceID = trim(fgets($input)); |
||
| 23 | fclose($input); |
||
| 24 | if (is_numeric($invoiceID)) { |
||
| 25 | $invoiceID = intval($invoiceID); |
||
| 26 | } |
||
| 27 | return $invoiceID; |
||
| 28 | } |
||
| 29 |