for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace BitWasp\Trezor\Device\UserInput;
use BitWasp\Trezor\Device\Exception\UserInputException;
class FgetsUserInputRequest extends UserInputRequest
{
public function getInput(): string
$input = fgets(STDIN);
if (is_string($input)) {
is_string($input)
true
return $input;
}
throw new UserInputException("Failed to read from command line");