aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe/src/json
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2026-06-21 16:48:03 +0900
committernsfisis <nsfisis@gmail.com>2026-06-21 16:50:58 +0900
commit12a7756588a20f1351e6976f0c009de5992514a9 (patch)
tree53ee08e207fc06687d998e9ad749e425e56ee138 /crates/shirabe/src/json
parent657440d01423b50153d07ebc288d9bd2fc982d52 (diff)
downloadphp-shirabe-12a7756588a20f1351e6976f0c009de5992514a9.tar.gz
php-shirabe-12a7756588a20f1351e6976f0c009de5992514a9.tar.zst
php-shirabe-12a7756588a20f1351e6976f0c009de5992514a9.zip
feat(php-shim): implement round() shim
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Diffstat (limited to 'crates/shirabe/src/json')
-rw-r--r--crates/shirabe/src/json/json_manipulator.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/crates/shirabe/src/json/json_manipulator.rs b/crates/shirabe/src/json/json_manipulator.rs
index 75f933c..f5ad2cd 100644
--- a/crates/shirabe/src/json/json_manipulator.rs
+++ b/crates/shirabe/src/json/json_manipulator.rs
@@ -6,8 +6,8 @@ use shirabe_external_packages::composer::pcre::{CaptureKey, Preg};
use shirabe_php_shim::{
ArrayObject, InvalidArgumentException, LogicException, PhpMixed, StdClass, addcslashes,
array_key_exists, array_keys, array_reverse, count, empty, explode, implode, in_array,
- is_array, is_int, is_numeric, json_decode, max_i64, preg_quote, rtrim, str_contains,
- str_repeat, str_replace, strlen, strnatcmp, strpos, substr, trim, uksort,
+ is_array, is_int, is_numeric, json_decode, max, preg_quote, rtrim, str_contains, str_repeat,
+ str_replace, strlen, strnatcmp, strpos, substr, trim, uksort,
};
use crate::json::JsonFile;
@@ -351,7 +351,7 @@ impl JsonManipulator {
list_regex = Some(format!(
"{{{}^(?P<start>\\s*\\{{\\s*(?:(?&string)\\s*:\\s*(?&json)\\s*,\\s*)*?\"repositories\"\\s*:\\s*\\[\\s*((?&json)\\s*+,\\s*+){{{}}})(?P<repository>(?&object))(?P<end>.*)}}sx",
Self::DEFINES,
- max_i64(0, i_val)
+ max(0, i_val)
));
}
@@ -1251,7 +1251,7 @@ impl JsonManipulator {
let list_skip_to_item_regex = format!(
"{{{}^(?P<start>\\[\\s*((?&json)\\s*+,\\s*?){{{}}})(?P<space_before_item>(\\s*))(?P<end>.*)}}sx",
Self::DEFINES,
- max_i64(0, index)
+ max(0, index)
);
let value_capture = value.clone();