mirror of
https://gitlab.com/signalytic/client-external/streamline/streamline-emr.git
synced 2026-09-13 11:41:31 +00:00
updated streamline-setup v2
This commit is contained in:
+16
-16
@@ -40,7 +40,7 @@ final class Php83
|
||||
return \JSON_ERROR_NONE === json_last_error();
|
||||
}
|
||||
|
||||
public static function mb_str_pad(string $string, int $length, string $pad_string = ' ', int $pad_type = \STR_PAD_RIGHT, string $encoding = null): string
|
||||
public static function mb_str_pad(string $string, int $length, string $pad_string = ' ', int $pad_type = \STR_PAD_RIGHT, ?string $encoding = null): string
|
||||
{
|
||||
if (!\in_array($pad_type, [\STR_PAD_RIGHT, \STR_PAD_LEFT, \STR_PAD_BOTH], true)) {
|
||||
throw new \ValueError('mb_str_pad(): Argument #4 ($pad_type) must be STR_PAD_LEFT, STR_PAD_RIGHT, or STR_PAD_BOTH');
|
||||
@@ -90,17 +90,17 @@ final class Php83
|
||||
throw new \ValueError('str_increment(): Argument #1 ($string) cannot be empty');
|
||||
}
|
||||
|
||||
if (!\preg_match("/^[a-zA-Z0-9]+$/", $string)) {
|
||||
if (!preg_match('/^[a-zA-Z0-9]+$/', $string)) {
|
||||
throw new \ValueError('str_increment(): Argument #1 ($string) must be composed only of alphanumeric ASCII characters');
|
||||
}
|
||||
|
||||
if (\is_numeric($string)) {
|
||||
if (is_numeric($string)) {
|
||||
$offset = stripos($string, 'e');
|
||||
if ($offset !== false) {
|
||||
if (false !== $offset) {
|
||||
$char = $string[$offset];
|
||||
$char++;
|
||||
++$char;
|
||||
$string[$offset] = $char;
|
||||
$string++;
|
||||
++$string;
|
||||
|
||||
switch ($string[$offset]) {
|
||||
case 'f':
|
||||
@@ -130,28 +130,28 @@ final class Php83
|
||||
throw new \ValueError('str_decrement(): Argument #1 ($string) cannot be empty');
|
||||
}
|
||||
|
||||
if (!\preg_match("/^[a-zA-Z0-9]+$/", $string)) {
|
||||
if (!preg_match('/^[a-zA-Z0-9]+$/', $string)) {
|
||||
throw new \ValueError('str_decrement(): Argument #1 ($string) must be composed only of alphanumeric ASCII characters');
|
||||
}
|
||||
|
||||
if (\preg_match('/\A(?:0[aA0]?|[aA])\z/', $string)) {
|
||||
if (preg_match('/\A(?:0[aA0]?|[aA])\z/', $string)) {
|
||||
throw new \ValueError(sprintf('str_decrement(): Argument #1 ($string) "%s" is out of decrement range', $string));
|
||||
}
|
||||
|
||||
if (!\in_array(substr($string, -1), ['A', 'a', '0'], true)) {
|
||||
return join('', array_slice(str_split($string), 0, -1)) . chr(ord(substr($string, -1)) - 1);
|
||||
return implode('', \array_slice(str_split($string), 0, -1)).\chr(\ord(substr($string, -1)) - 1);
|
||||
}
|
||||
|
||||
$carry = '';
|
||||
$decremented = '';
|
||||
|
||||
for ($i = strlen($string) - 1; $i >= 0; $i--) {
|
||||
for ($i = \strlen($string) - 1; $i >= 0; --$i) {
|
||||
$char = $string[$i];
|
||||
|
||||
switch ($char) {
|
||||
case 'A':
|
||||
if ('' !== $carry) {
|
||||
$decremented = $carry . $decremented;
|
||||
$decremented = $carry.$decremented;
|
||||
$carry = '';
|
||||
}
|
||||
$carry = 'Z';
|
||||
@@ -159,7 +159,7 @@ final class Php83
|
||||
break;
|
||||
case 'a':
|
||||
if ('' !== $carry) {
|
||||
$decremented = $carry . $decremented;
|
||||
$decremented = $carry.$decremented;
|
||||
$carry = '';
|
||||
}
|
||||
$carry = 'z';
|
||||
@@ -167,7 +167,7 @@ final class Php83
|
||||
break;
|
||||
case '0':
|
||||
if ('' !== $carry) {
|
||||
$decremented = $carry . $decremented;
|
||||
$decremented = $carry.$decremented;
|
||||
$carry = '';
|
||||
}
|
||||
$carry = '9';
|
||||
@@ -175,19 +175,19 @@ final class Php83
|
||||
break;
|
||||
case '1':
|
||||
if ('' !== $carry) {
|
||||
$decremented = $carry . $decremented;
|
||||
$decremented = $carry.$decremented;
|
||||
$carry = '';
|
||||
}
|
||||
|
||||
break;
|
||||
default:
|
||||
if ('' !== $carry) {
|
||||
$decremented = $carry . $decremented;
|
||||
$decremented = $carry.$decremented;
|
||||
$carry = '';
|
||||
}
|
||||
|
||||
if (!\in_array($char, ['A', 'a', '0'], true)) {
|
||||
$decremented = chr(ord($char) - 1) . $decremented;
|
||||
$decremented = \chr(\ord($char) - 1).$decremented;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user