Skip to content

Commit 039beb2

Browse files
committed
Add several new PHP8 opcodes and clean extra typehints from interfaces
1 parent f433987 commit 039beb2

12 files changed

+5
-22
lines changed

src/ClassExtension/ObjectCastInterface.php

-2
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@ interface ObjectCastInterface
2222
/**
2323
* Performs casting of given object to another value
2424
*
25-
* @param CastObjectHook $hook Instance of current hook
26-
*
2725
* @return mixed Casted value
2826
*/
2927
public static function __cast(CastObjectHook $hook);

src/ClassExtension/ObjectCompareValuesInterface.php

-2
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@ interface ObjectCompareValuesInterface
2222
/**
2323
* Performs comparison of given object with another value
2424
*
25-
* @param CompareValuesHook $hook Instance of current hook
26-
*
2725
* @return int Result of comparison: 1 is greater, -1 is less, 0 is equal
2826
*/
2927
public static function __compare(CompareValuesHook $hook): int;

src/ClassExtension/ObjectCreateInterface.php

-2
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@ interface ObjectCreateInterface
2323
/**
2424
* Performs low-level initialization of object during new instances creation
2525
*
26-
* @param CreateObjectHook $hook Hook instance that provides proceed() and setClassType() method
27-
*
2826
* @return CData Pointer to the zend_object instance
2927
*/
3028
public static function __init(CreateObjectHook $hook): CData;

src/ClassExtension/ObjectCreateTrait.php

-2
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@ trait ObjectCreateTrait
2323
/**
2424
* Performs low-level initialization of object during new instances creation
2525
*
26-
* @param CreateObjectHook $hook Hook instance that provides proceed() and setClassType() method
27-
*
2826
* @return CData Pointer to the zend_object instance
2927
*/
3028
public static function __init(CreateObjectHook $hook): CData

src/ClassExtension/ObjectDoOperationInterface.php

-2
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@ interface ObjectDoOperationInterface
2222
/**
2323
* Performs an operation on given object
2424
*
25-
* @param DoOperationHook $hook Instance of current hook
26-
*
2725
* @return mixed Result of operation value
2826
*/
2927
public static function __doOperation(DoOperationHook $hook);

src/ClassExtension/ObjectGetPropertiesForInterface.php

-2
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@ interface ObjectGetPropertiesForInterface
2222
/**
2323
* Returns a hash-map (array) representation of object (for casting to array, json encoding, var dumping)
2424
*
25-
* @param GetPropertiesForHook $hook Instance of current hook
26-
*
2725
* @return array Key-value pair of fields
2826
*/
2927
public static function __getFields(GetPropertiesForHook $hook): array;

src/ClassExtension/ObjectGetPropertyPointerInterface.php

-2
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@ interface ObjectGetPropertyPointerInterface
2222
/**
2323
* Returns a pointer to an object's field
2424
*
25-
* @param GetPropertyPointerHook $hook Instance of current hook
26-
*
2725
* @return mixed Value to return
2826
*/
2927
public static function __fieldPointer(GetPropertyPointerHook $hook);

src/ClassExtension/ObjectHasPropertyInterface.php

-2
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@ interface ObjectHasPropertyInterface
2222
/**
2323
* Performs checking of object's field
2424
*
25-
* @param HasPropertyHook $hook Instance of current hook
26-
*
2725
* @return int Value to return
2826
*/
2927
public static function __fieldIsset(HasPropertyHook $hook);

src/ClassExtension/ObjectReadPropertyInterface.php

-2
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@ interface ObjectReadPropertyInterface
2222
/**
2323
* Performs reading of object's field
2424
*
25-
* @param ReadPropertyHook $hook Instance of current hook
26-
*
2725
* @return mixed Value to return
2826
*/
2927
public static function __fieldRead(ReadPropertyHook $hook);

src/ClassExtension/ObjectUnsetPropertyInterface.php

-2
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@ interface ObjectUnsetPropertyInterface
2121
{
2222
/**
2323
* Performs reading of object's field
24-
*
25-
* @param UnsetPropertyHook $hook Instance of current hook
2624
*/
2725
public static function __fieldUnset(UnsetPropertyHook $hook): void;
2826
}

src/ClassExtension/ObjectWritePropertyInterface.php

-2
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@ interface ObjectWritePropertyInterface
2222
/**
2323
* Performs writing of value to object's field
2424
*
25-
* @param WritePropertyHook $hook Instance of current hook
26-
*
2725
* @return mixed New value to write, return given $value if you don't want to adjust it
2826
*/
2927
public static function __fieldWrite(WritePropertyHook $hook);

src/System/OpCode.php

+5
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,11 @@ final class OpCode
217217
public const GET_CALLED_CLASS = 192;
218218
public const GET_TYPE = 193;
219219
public const ARRAY_KEY_EXIST = 194;
220+
public const MATCH = 195;
221+
public const CASE_STRICT = 196;
222+
public const MATCH_ERROR = 197;
223+
public const JMP_NULL = 198;
224+
public const CHECK_UNDEF_ARGS = 199;
220225

221226
/**
222227
* Reversed class constants, containing names by number

0 commit comments

Comments
 (0)