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

Commit 31a99bf

Browse files
committed
Add missed parameter type hint
1 parent 37ad9e3 commit 31a99bf

File tree

3 files changed

+34
-33
lines changed

3 files changed

+34
-33
lines changed

src/php_v8_object.cc

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1405,42 +1405,42 @@ ZEND_END_ARG_INFO()
14051405

14061406
PHP_V8_ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_hasOwnProperty, ZEND_RETURN_VALUE, 2, _IS_BOOL, 0)
14071407
ZEND_ARG_OBJ_INFO(0, context, V8\\Context, 0)
1408-
ZEND_ARG_INFO(0, key)
1408+
ZEND_ARG_OBJ_INFO(0, key, V8\\NameValue, 0)
14091409
ZEND_END_ARG_INFO()
14101410

14111411
PHP_V8_ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_hasRealNamedProperty, ZEND_RETURN_VALUE, 2, _IS_BOOL, 0)
14121412
ZEND_ARG_OBJ_INFO(0, context, V8\\Context, 0)
1413-
ZEND_ARG_INFO(0, key)
1413+
ZEND_ARG_OBJ_INFO(0, key, V8\\NameValue, 0)
14141414
ZEND_END_ARG_INFO()
14151415

14161416
PHP_V8_ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_hasRealIndexedProperty, ZEND_RETURN_VALUE, 2, _IS_BOOL, 0)
14171417
ZEND_ARG_OBJ_INFO(0, context, V8\\Context, 0)
1418-
ZEND_ARG_INFO(0, index)
1418+
ZEND_ARG_TYPE_INFO(0, index, IS_LONG, 0)
14191419
ZEND_END_ARG_INFO()
14201420

14211421
PHP_V8_ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_hasRealNamedCallbackProperty, ZEND_RETURN_VALUE, 2, _IS_BOOL, 0)
14221422
ZEND_ARG_OBJ_INFO(0, context, V8\\Context, 0)
1423-
ZEND_ARG_INFO(0, key)
1423+
ZEND_ARG_OBJ_INFO(0, key, V8\\NameValue, 0)
14241424
ZEND_END_ARG_INFO()
14251425

14261426
PHP_V8_ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_getRealNamedPropertyInPrototypeChain, ZEND_RETURN_VALUE, 2, V8\\Value, 0)
14271427
ZEND_ARG_OBJ_INFO(0, context, V8\\Context, 0)
1428-
ZEND_ARG_INFO(0, key)
1428+
ZEND_ARG_OBJ_INFO(0, key, V8\\NameValue, 0)
14291429
ZEND_END_ARG_INFO()
14301430

14311431
PHP_V8_ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_getRealNamedPropertyAttributesInPrototypeChain, ZEND_RETURN_VALUE, 2, IS_LONG, 0)
14321432
ZEND_ARG_OBJ_INFO(0, context, V8\\Context, 0)
1433-
ZEND_ARG_INFO(0, key)
1433+
ZEND_ARG_OBJ_INFO(0, key, V8\\NameValue, 0)
14341434
ZEND_END_ARG_INFO()
14351435

14361436
PHP_V8_ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_getRealNamedProperty, ZEND_RETURN_VALUE, 2, V8\\Value, 0)
14371437
ZEND_ARG_OBJ_INFO(0, context, V8\\Context, 0)
1438-
ZEND_ARG_INFO(0, key)
1438+
ZEND_ARG_OBJ_INFO(0, key, V8\\NameValue, 0)
14391439
ZEND_END_ARG_INFO()
14401440

14411441
PHP_V8_ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_getRealNamedPropertyAttributes, ZEND_RETURN_VALUE, 2, IS_LONG, 0)
14421442
ZEND_ARG_OBJ_INFO(0, context, V8\\Context, 0)
1443-
ZEND_ARG_INFO(0, key)
1443+
ZEND_ARG_OBJ_INFO(0, key, V8\\NameValue, 0)
14441444
ZEND_END_ARG_INFO()
14451445

14461446
PHP_V8_ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_hasNamedLookupInterceptor, ZEND_RETURN_VALUE, 0, _IS_BOOL, 0)

stubs/src/ObjectValue.php

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -302,55 +302,56 @@ public function setIntegrityLevel(Context $context, int $level): bool
302302
}
303303

304304
/**
305-
* @param Context $context
306-
* @param string $key
305+
* @param Context $context
306+
* @param NameValue $key
307307
*
308308
* @return bool
309309
*/
310-
public function hasOwnProperty(Context $context, $key): bool
310+
public function hasOwnProperty(Context $context, NameValue $key): bool
311311
{
312312
}
313313

314314
/**
315-
* @param Context $context
316-
* @param string $key
315+
* @param Context $context
316+
*
317+
* @param NameValue $key
317318
*
318319
* @return bool
319320
*/
320-
public function hasRealNamedProperty(Context $context, $key): bool
321+
public function hasRealNamedProperty(Context $context, NameValue $key): bool
321322
{
322323
}
323324

324325
/**
325326
* @param Context $context
326-
* @param string $index
327+
* @param int $index
327328
*
328329
* @return bool
329330
*/
330-
public function hasRealIndexedProperty(Context $context, $index): bool
331+
public function hasRealIndexedProperty(Context $context, int $index): bool
331332
{
332333
}
333334

334335
/**
335-
* @param Context $context
336-
* @param string $key
336+
* @param Context $context
337+
* @param NameValue $key
337338
*
338339
* @return bool
339340
*/
340-
public function hasRealNamedCallbackProperty(Context $context, $key): bool
341+
public function hasRealNamedCallbackProperty(Context $context, NameValue $key): bool
341342
{
342343
}
343344

344345
/**
345346
* If result.IsEmpty() no real property was located in the prototype chain.
346347
* This means interceptors in the prototype chain are not called.
347348
*
348-
* @param Context $context
349-
* @param string $key
349+
* @param Context $context
350+
* @param NameValue $key
350351
*
351352
* @return Value
352353
*/
353-
public function getRealNamedPropertyInPrototypeChain(Context $context, $key): Value
354+
public function getRealNamedPropertyInPrototypeChain(Context $context, NameValue $key): Value
354355
{
355356
}
356357

@@ -373,12 +374,12 @@ public function getRealNamedPropertyAttributesInPrototypeChain(Context $context,
373374
* in the prototype chain.
374375
* This means interceptors in the prototype chain are not called.
375376
*
376-
* @param Context $context
377-
* @param string $key
377+
* @param Context $context
378+
* @param NameValue $key
378379
*
379380
* @return Value
380381
*/
381-
public function getRealNamedProperty(Context $context, $key): Value
382+
public function getRealNamedProperty(Context $context, NameValue $key): Value
382383
{
383384
}
384385

tests/001-verify_extension_entities.phpt

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -689,14 +689,14 @@ class V8\ObjectValue
689689
public function objectProtoToString(V8\Context $context): V8\StringValue
690690
public function getConstructorName(): V8\StringValue
691691
public function setIntegrityLevel(V8\Context $context, int $level): bool
692-
public function hasOwnProperty(V8\Context $context, $key): bool
693-
public function hasRealNamedProperty(V8\Context $context, $key): bool
694-
public function hasRealIndexedProperty(V8\Context $context, $index): bool
695-
public function hasRealNamedCallbackProperty(V8\Context $context, $key): bool
696-
public function getRealNamedPropertyInPrototypeChain(V8\Context $context, $key): V8\Value
697-
public function getRealNamedPropertyAttributesInPrototypeChain(V8\Context $context, $key): int
698-
public function getRealNamedProperty(V8\Context $context, $key): V8\Value
699-
public function getRealNamedPropertyAttributes(V8\Context $context, $key): int
692+
public function hasOwnProperty(V8\Context $context, V8\NameValue $key): bool
693+
public function hasRealNamedProperty(V8\Context $context, V8\NameValue $key): bool
694+
public function hasRealIndexedProperty(V8\Context $context, int $index): bool
695+
public function hasRealNamedCallbackProperty(V8\Context $context, V8\NameValue $key): bool
696+
public function getRealNamedPropertyInPrototypeChain(V8\Context $context, V8\NameValue $key): V8\Value
697+
public function getRealNamedPropertyAttributesInPrototypeChain(V8\Context $context, V8\NameValue $key): int
698+
public function getRealNamedProperty(V8\Context $context, V8\NameValue $key): V8\Value
699+
public function getRealNamedPropertyAttributes(V8\Context $context, V8\NameValue $key): int
700700
public function hasNamedLookupInterceptor(): bool
701701
public function hasIndexedLookupInterceptor(): bool
702702
public function getIdentityHash(): int

0 commit comments

Comments
 (0)