Files
lis/vendor/fawno/php-serial/src/Config/StopBits.php
T
2025-02-25 01:50:20 +00:00

21 lines
428 B
PHP

<?php
declare(strict_types=1);
namespace Fawno\PhpSerial\Config;
use ReflectionClass;
class StopBits {
//public const NONE = 0;
public const ONE = 1;
public const TWO = 2;
static function getConstants () : array {
return (new ReflectionClass(__CLASS__))->getConstants();
}
static function checkValue (int $const) : bool {
return in_array($const, self::getConstants());
}
}