Skip to content
This repository was archived by the owner on Mar 29, 2024. It is now read-only.

Commit cd3bc4b

Browse files
committed
[internals] Rename ScriptOrigin::{scriptID => scriptId}()
1 parent 40a1531 commit cd3bc4b

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/php_v8_script_origin.cc

+3-3
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ static PHP_METHOD(ScriptOrigin, resourceColumnOffset) {
224224
RETVAL_ZVAL(zend_read_property(this_ce, getThis(), ZEND_STRL("resource_column_offset"), 0, &rv), 1, 0);
225225
}
226226

227-
static PHP_METHOD(ScriptOrigin, scriptID) {
227+
static PHP_METHOD(ScriptOrigin, scriptId) {
228228
zval rv;
229229

230230
if (zend_parse_parameters_none() == FAILURE) {
@@ -274,7 +274,7 @@ ZEND_END_ARG_INFO()
274274
PHP_V8_ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_resourceColumnOffset, ZEND_RETURN_VALUE, 0, IS_LONG, 0)
275275
ZEND_END_ARG_INFO()
276276

277-
PHP_V8_ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_scriptID, ZEND_RETURN_VALUE, 0, IS_LONG, 0)
277+
PHP_V8_ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_scriptId, ZEND_RETURN_VALUE, 0, IS_LONG, 0)
278278
ZEND_END_ARG_INFO()
279279

280280
PHP_V8_ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_sourceMapUrl, ZEND_RETURN_VALUE, 0, IS_STRING, 0)
@@ -289,7 +289,7 @@ static const zend_function_entry php_v8_script_origin_methods[] = {
289289
PHP_V8_ME(ScriptOrigin, resourceName, ZEND_ACC_PUBLIC)
290290
PHP_V8_ME(ScriptOrigin, resourceLineOffset, ZEND_ACC_PUBLIC)
291291
PHP_V8_ME(ScriptOrigin, resourceColumnOffset, ZEND_ACC_PUBLIC)
292-
PHP_V8_ME(ScriptOrigin, scriptID, ZEND_ACC_PUBLIC)
292+
PHP_V8_ME(ScriptOrigin, scriptId, ZEND_ACC_PUBLIC)
293293
PHP_V8_ME(ScriptOrigin, sourceMapUrl, ZEND_ACC_PUBLIC)
294294
PHP_V8_ME(ScriptOrigin, options, ZEND_ACC_PUBLIC)
295295

tests/ScriptOrigin.phpt

+4-4
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ $helper->header('Test getters (default)');
1919
$helper->method_matches_with_output($obj, 'resourceName', 'test');
2020
$helper->method_matches_with_output($obj, 'resourceLineOffset', 0);
2121
$helper->method_matches_with_output($obj, 'resourceColumnOffset', 0);
22-
$helper->method_matches_with_output($obj, 'scriptID', 0);
22+
$helper->method_matches_with_output($obj, 'scriptId', 0);
2323
$helper->method_matches_with_output($obj, 'sourceMapUrl', '');
2424
$helper->method_matches_instanceof($obj, 'options', V8\ScriptOriginOptions::class);
2525
$helper->space();
@@ -43,7 +43,7 @@ $helper->header('Test getters');
4343
$helper->method_matches_with_output($obj, 'resourceName', 'test');
4444
$helper->method_matches_with_output($obj, 'resourceLineOffset', 1);
4545
$helper->method_matches_with_output($obj, 'resourceColumnOffset', 2);
46-
$helper->method_matches_with_output($obj, 'scriptID', 3);
46+
$helper->method_matches_with_output($obj, 'scriptId', 3);
4747
$helper->method_matches_with_output($obj, 'sourceMapUrl', 'map');
4848
$helper->method_matches_instanceof($obj, 'options', V8\ScriptOriginOptions::class);
4949
$helper->space();
@@ -91,7 +91,7 @@ Test getters (default):
9191
V8\ScriptOrigin::resourceName() matches expected 'test'
9292
V8\ScriptOrigin::resourceLineOffset() matches expected 0
9393
V8\ScriptOrigin::resourceColumnOffset() matches expected 0
94-
V8\ScriptOrigin::scriptID() matches expected 0
94+
V8\ScriptOrigin::scriptId() matches expected 0
9595
V8\ScriptOrigin::sourceMapUrl() matches expected ''
9696
V8\ScriptOrigin::options() result is instance of V8\ScriptOriginOptions
9797

@@ -134,7 +134,7 @@ Test getters:
134134
V8\ScriptOrigin::resourceName() matches expected 'test'
135135
V8\ScriptOrigin::resourceLineOffset() matches expected 1
136136
V8\ScriptOrigin::resourceColumnOffset() matches expected 2
137-
V8\ScriptOrigin::scriptID() matches expected 3
137+
V8\ScriptOrigin::scriptId() matches expected 3
138138
V8\ScriptOrigin::sourceMapUrl() matches expected 'map'
139139
V8\ScriptOrigin::options() result is instance of V8\ScriptOriginOptions
140140

0 commit comments

Comments
 (0)