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

Commit 3bacc5c

Browse files
committed
Cleanup stubs [skip ci]
1 parent 75c3a40 commit 3bacc5c

27 files changed

+130
-132
lines changed

stubs/src/AccessControl.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@
1818
class AccessControl
1919
{
2020
const DEFAULT_ACCESS = 0; // do not allow cross-context access
21-
const ALL_CAN_READ = 1; // all cross-context reads are allowed
22-
const ALL_CAN_WRITE = 2; // all cross-context writes are allowed
21+
const ALL_CAN_READ = 1; // all cross-context reads are allowed
22+
const ALL_CAN_WRITE = 2; // all cross-context writes are allowed
2323
}

stubs/src/CallbackInfo.php

+5-5
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,14 @@
1818
class CallbackInfo
1919
{
2020
/**
21-
* @return \V8\Isolate
21+
* @return Isolate
2222
*/
2323
public function getIsolate(): Isolate
2424
{
2525
}
2626

2727
/**
28-
* @return \V8\Context
28+
* @return Context
2929
*/
3030
public function getContext(): Context
3131
{
@@ -34,7 +34,7 @@ public function getContext(): Context
3434
/**
3535
* Returns the receiver. This corresponds to the "this" value.
3636
*
37-
* @return \V8\ObjectValue
37+
* @return ObjectValue
3838
*/
3939
public function this(): ObjectValue
4040
{
@@ -50,7 +50,7 @@ public function this(): ObjectValue
5050
* referencing this callback was found (which in V8 internally is often
5151
* referred to as holder [sic]).
5252
*
53-
* @return \V8\ObjectValue
53+
* @return ObjectValue
5454
*/
5555
public function holder(): ObjectValue
5656
{
@@ -59,7 +59,7 @@ public function holder(): ObjectValue
5959
/**
6060
* The ReturnValue for the call
6161
*
62-
* @return \V8\ReturnValue
62+
* @return ReturnValue
6363
*/
6464
public function getReturnValue(): ReturnValue
6565
{

stubs/src/Context.php

+10-13
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
class Context
2323
{
2424
/**
25-
* @var \V8\Isolate
25+
* @var Isolate
2626
*/
2727
private $isolate;
2828

@@ -41,21 +41,18 @@ class Context
4141
* template. The state of the global object will be completely reset
4242
* and only object identify will remain.
4343
*
44-
* @param \V8\Isolate $isolate
45-
* @param \V8\ObjectTemplate|null $global_template
46-
* @param \V8\ObjectValue|null $global_object
44+
* @param Isolate $isolate
45+
* @param ObjectTemplate|null $global_template
46+
* @param ObjectValue|null $global_object
4747
*
4848
* @internal param array|null $extensions Currently unused as there are not extensions support
4949
*/
50-
public function __construct(
51-
Isolate $isolate,
52-
ObjectTemplate $global_template = null,
53-
ObjectValue $global_object = null
54-
) {
50+
public function __construct(Isolate $isolate, ObjectTemplate $global_template = null, ObjectValue $global_object = null)
51+
{
5552
}
5653

5754
/**
58-
* @return \V8\Isolate
55+
* @return Isolate
5956
*/
6057
public function getIsolate(): Isolate
6158
{
@@ -74,7 +71,7 @@ public function getIsolate(): Isolate
7471
* would break VM---v8 expects only global object as a prototype of global
7572
* proxy object.
7673
*
77-
* @return \V8\ObjectValue
74+
* @return ObjectValue
7875
*/
7976
public function globalObject(): ObjectValue
8077
{
@@ -93,7 +90,7 @@ public function detachGlobal()
9390
* Sets the security token for the context. To access an object in
9491
* another context, the security tokens must match.
9592
*
96-
* @param \V8\Value $token
93+
* @param Value $token
9794
*/
9895
public function setSecurityToken(Value $token)
9996
{
@@ -109,7 +106,7 @@ public function useDefaultSecurityToken()
109106
/**
110107
* Returns the security token of this context.
111108
*
112-
* @return \V8\Value
109+
* @return Value|PrimitiveValue|ObjectValue
113110
*/
114111
public function getSecurityToken(): Value
115112
{

stubs/src/ExceptionManager.php

+15-15
Original file line numberDiff line numberDiff line change
@@ -23,48 +23,48 @@
2323
class ExceptionManager
2424
{
2525
/**
26-
* @param Context $context
27-
* @param \V8\StringValue $message
26+
* @param Context $context
27+
* @param StringValue $message
2828
*
29-
* @return \V8\ObjectValue
29+
* @return ObjectValue
3030
*/
3131
public static function createRangeError(Context $context, StringValue $message): ObjectValue
3232
{
3333
}
3434

3535
/**
36-
* @param Context $context
37-
* @param \V8\StringValue $message
36+
* @param Context $context
37+
* @param StringValue $message
3838
*
39-
* @return \V8\ObjectValue
39+
* @return ObjectValue
4040
*/
4141
public static function createReferenceError(Context $context, StringValue $message): ObjectValue
4242
{
4343
}
4444

4545
/**
46-
* @param Context $context
47-
* @param \V8\StringValue $message
46+
* @param Context $context
47+
* @param StringValue $message
4848
*
49-
* @return \V8\ObjectValue
49+
* @return ObjectValue
5050
*/
5151
public static function createSyntaxError(Context $context, StringValue $message): ObjectValue
5252
{
5353
}
5454

5555
/**
56-
* @param Context $context
57-
* @param \V8\StringValue $message
56+
* @param Context $context
57+
* @param StringValue $message
5858
*
59-
* @return \V8\ObjectValue
59+
* @return ObjectValue
6060
*/
6161
public static function createTypeError(Context $context, StringValue $message): ObjectValue
6262
{
6363
}
6464

6565
/**
66-
* @param Context $context
67-
* @param \V8\StringValue $message
66+
* @param Context $context
67+
* @param StringValue $message
6868
*
6969
* @return ObjectValue
7070
*/
@@ -82,7 +82,7 @@ public static function createError(Context $context, StringValue $message): Obje
8282
*
8383
* @return Message
8484
*/
85-
public static function createMessage(Context $context, Value $exception): Message
85+
public static function createMessage(Context $context, Value $exception): Message
8686
{
8787
}
8888

stubs/src/Exceptions/TryCatchException.php

+1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
use V8\Isolate;
2121
use V8\TryCatch;
2222

23+
2324
class TryCatchException extends Exception
2425
{
2526
/**

stubs/src/FunctionCallbackInfo.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public function length(): int
3434
/**
3535
* Get available arguments
3636
*
37-
* @return Value[] | StringValue[] | SymbolValue[] | NumberValue[] | ObjectValue[] | ArrayObject[] | FunctionObject[] | StringObject[] | SymbolObject[]
37+
* @return Value[]
3838
*/
3939
public function arguments(): array
4040
{
@@ -43,7 +43,7 @@ public function arguments(): array
4343
/**
4444
* For construct calls, this returns the "new.target" value.
4545
*
46-
* @return Value
46+
* @return Value|PrimitiveValue|ObjectValue
4747
*/
4848
public function newTarget(): Value
4949
{

stubs/src/FunctionObject.php

+15-15
Original file line numberDiff line numberDiff line change
@@ -25,32 +25,32 @@ class FunctionObject extends ObjectValue
2525
* Create a function in the current execution context
2626
* for a given FunctionCallback.
2727
*
28-
* @param \V8\Context $context
29-
* @param callable $callback
30-
* @param int $length
31-
* @param int $behavior
28+
* @param Context $context
29+
* @param callable $callback
30+
* @param int $length
31+
* @param int $behavior
3232
*/
3333
public function __construct(Context $context, callable $callback, int $length = 0, int $behavior = ConstructorBehavior::ALLOW)
3434
{
3535
parent::__construct($context);
3636
}
3737

3838
/**
39-
* @param \V8\Context $context
40-
* @param \V8\Value[] $arguments
39+
* @param Context $context
40+
* @param Value[] $arguments
4141
*
42-
* @return \V8\ObjectValue
42+
* @return ObjectValue
4343
*/
4444
public function newInstance(Context $context, array $arguments = []): ObjectValue
4545
{
4646
}
4747

4848
/**
49-
* @param \V8\Context $context
50-
* @param \V8\Value $recv
51-
* @param \V8\Value[] $arguments
49+
* @param Context $context
50+
* @param Value $recv
51+
* @param Value[] $arguments
5252
*
53-
* @return \V8\Value
53+
* @return Value|PrimitiveValue|ObjectValue
5454
*/
5555
public function call(Context $context, Value $recv, array $arguments = []): Value
5656
{
@@ -64,7 +64,7 @@ public function setName(StringValue $name)
6464
}
6565

6666
/**
67-
* @return \V8\Value | StringValue
67+
* @return Value|StringValue
6868
*/
6969
public function getName(): Value
7070
{
@@ -76,7 +76,7 @@ public function getName(): Value
7676
* in an OO style, where many functions are anonymous but are assigned
7777
* to object properties.
7878
*
79-
* @return \V8\Value | StringValue
79+
* @return Value|StringValue
8080
*/
8181
public function getInferredName(): Value
8282
{
@@ -86,7 +86,7 @@ public function getInferredName(): Value
8686
* User-defined name assigned to the "displayName" property of this function.
8787
* Used to facilitate debugging and profiling of JavaScript code.
8888
*
89-
* @return \V8\Value | StringValue
89+
* @return Value|StringValue
9090
*/
9191
public function getDisplayName(): Value
9292
{
@@ -125,7 +125,7 @@ public function getScriptId(): ?int
125125
/**
126126
* Returns the original function if this function is bound, else returns UndefinedValue.
127127
*
128-
* @return FunctionObject|UndefinedValue|Value
128+
* @return Value|FunctionObject|UndefinedValue
129129
*/
130130
public function getBoundFunction(): Value
131131
{

stubs/src/FunctionTemplate.php

+4-4
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,8 @@
8484
* \code
8585
* FunctionTemplate Parent -> Parent() . prototype -> { }
8686
* ^ ^
87-
* | Inherit(Parent) | .__proto__
88-
* | |
87+
* |Inherit(Parent) |.__proto__
88+
* | |
8989
* FunctionTemplate Child -> Child() . prototype -> { }
9090
* \endcode
9191
*
@@ -172,7 +172,7 @@ public function setLength(int $length): void
172172
/**
173173
* Get the InstanceTemplate.
174174
*
175-
* @return \V8\ObjectTemplate
175+
* @return ObjectTemplate
176176
*/
177177
public function instanceTemplate(): ObjectTemplate
178178
{
@@ -193,7 +193,7 @@ public function inherit(FunctionTemplate $parent)
193193
* A PrototypeTemplate is the template used to create the prototype object
194194
* of the function created by this template.
195195
*
196-
* @return \V8\ObjectTemplate
196+
* @return ObjectTemplate
197197
*/
198198
public function prototypeTemplate(): ObjectTemplate
199199
{

stubs/src/IndexFilter.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,5 @@
1818
class IndexFilter
1919
{
2020
const kIncludeIndices = 0; // allows for integer indices to be collected, while
21-
const kSkipIndices = 1; // will exclude integer indicies from being collected.
21+
const kSkipIndices = 1; // will exclude integer indicies from being collected.
2222
}

stubs/src/Isolate.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ public function inContext(): bool
8888
/**
8989
* Returns the last entered context.
9090
*
91-
* @return \V8\Context
91+
* @return Context
9292
*/
9393
public function getEnteredContext(): Context
9494
{

stubs/src/KeyCollectionMode.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,6 @@
2020
*/
2121
class KeyCollectionMode
2222
{
23-
const kOwnOnly = 0; // limits the collected properties to the given Object only. kIncludesPrototypes
23+
const kOwnOnly = 0; // limits the collected properties to the given Object only. kIncludesPrototypes
2424
const kIncludesPrototypes = 1; // will include all keys of the objects's prototype chain as well.
2525
}

stubs/src/MapObject.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public function clear()
3333
* @param Context $context
3434
* @param Value $key
3535
*
36-
* @return Value
36+
* @return Value|PrimitiveValue|ObjectValue
3737
*/
3838
public function get(Context $context, Value $key): Value
3939
{

stubs/src/ObjectTemplate.php

+5-5
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public function __construct(Isolate $isolate, FunctionTemplate $constructor = nu
3333
*
3434
* @param Context $context
3535
*
36-
* @return \V8\ObjectValue
36+
* @return ObjectValue
3737
*/
3838
public function newInstance(Context $context): ObjectValue
3939
{
@@ -85,9 +85,9 @@ public function setAccessor(
8585
* invoked instead of accessing the property directly on the JavaScript
8686
* object.
8787
*
88-
* See \V8\NamedPropertyHandlerConfiguration constructor argument description for details
88+
* See NamedPropertyHandlerConfiguration constructor argument description for details
8989
*
90-
* @param \V8\NamedPropertyHandlerConfiguration The NamedPropertyHandlerConfiguration that defines the callbacks to invoke when accessing a property.
90+
* @param NamedPropertyHandlerConfiguration The NamedPropertyHandlerConfiguration that defines the callbacks to invoke when accessing a property.
9191
*/
9292
public function setHandlerForNamedProperty(NamedPropertyHandlerConfiguration $configuration)
9393
{
@@ -100,9 +100,9 @@ public function setHandlerForNamedProperty(NamedPropertyHandlerConfiguration $co
100100
* this object template, the provided callback is invoked instead of
101101
* accessing the property directly on the JavaScript object.
102102
*
103-
* See \V8\IndexedPropertyHandlerConfiguration constructor argument description for details
103+
* See IndexedPropertyHandlerConfiguration constructor argument description for details
104104
*
105-
* @param \V8\IndexedPropertyHandlerConfiguration $configuration The IndexedPropertyHandlerConfiguration that defines the callbacks to invoke when accessing a property.
105+
* @param IndexedPropertyHandlerConfiguration $configuration The IndexedPropertyHandlerConfiguration that defines the callbacks to invoke when accessing a property.
106106
*/
107107
public function setHandlerForIndexedProperty(IndexedPropertyHandlerConfiguration $configuration)
108108
{

0 commit comments

Comments
 (0)