Skip to content

Commit 119bd26

Browse files
committed
php 7.1
1 parent 0f0b7b9 commit 119bd26

File tree

7 files changed

+15
-15
lines changed

7 files changed

+15
-15
lines changed

classes/Sap.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public function __construct(array $logonParameters = null)
2626
* @throws InvalidArgumentException If empty array provided
2727
* @throws SapConnectionException For invalid logon parameters or other error occured
2828
*/
29-
public function connect(array $logonParameters)
29+
public function connect(array $logonParameters): void
3030
{
3131
}
3232

@@ -78,7 +78,7 @@ public function call(string $function, array $args = null, bool $rtrim = null):
7878
*
7979
* @return void
8080
*/
81-
public function setFunctionClass(string $class)
81+
public function setFunctionClass(string $class): void
8282
{
8383
}
8484

php_sap.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ ZEND_END_ARG_INFO()
305305

306306
PHP_METHOD(Sap, connect);
307307

308-
ZEND_BEGIN_ARG_INFO(SAP_ME_ARGS(Sap, connect), 0)
308+
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO(SAP_ME_ARGS(Sap, connect), IS_VOID, NULL, 0)
309309
ZEND_ARG_ARRAY_INFO(0, logonParameters, 0)
310310
ZEND_END_ARG_INFO()
311311

@@ -317,7 +317,7 @@ ZEND_END_ARG_INFO()
317317

318318
PHP_METHOD(Sap, setFunctionClass);
319319

320-
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO(SAP_ME_ARGS(Sap, setFunctionClass), IS_NULL, NULL, 1)
320+
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO(SAP_ME_ARGS(Sap, setFunctionClass), IS_VOID, NULL, 0)
321321
ZEND_ARG_TYPE_INFO(0, className, IS_STRING, 0)
322322
ZEND_END_ARG_INFO()
323323

tests/sap_005_sap_invoke_function_error.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,5 +37,5 @@ catch (TypeError $e) {
3737
Argument 1 passed to sap_invoke_function() must be of the type string, array given
3838
Argument 2 passed to sap_invoke_function() must be of the type resource, array given
3939
Argument 2 passed to sap_invoke_function() must be a resource of type SAP Connection
40-
Argument 3 passed to sap_invoke_function() must be of the type array, string given
41-
Argument 4 passed to sap_invoke_function() must be of the type boolean, array given
40+
Argument 3 passed to sap_invoke_function() must be of the type array or null, string given
41+
Argument 4 passed to sap_invoke_function() must be of the type boolean or null, array given

tests/sap_SapFunction___invoke_error.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,6 @@ catch (LogicException $e) {
2323
}
2424
?>
2525
--EXPECT--
26-
Argument 1 passed to SapFunction::__invoke() must be of the type array, string given
27-
Argument 2 passed to SapFunction::__invoke() must be of the type boolean, array given
26+
Argument 1 passed to SapFunction::__invoke() must be of the type array or null, string given
27+
Argument 2 passed to SapFunction::__invoke() must be of the type boolean or null, array given
2828
Function's description has not been fetched

tests/sap_SapRfcReadTable_select_error.phpt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,10 +81,10 @@ Argument 1 passed to SapRfcReadTable::select() must not be an empty string
8181
Field names must be strings (integer detected)
8282
Argument 2 passed to SapRfcReadTable::select() must be of the type string, array given
8383
Argument 2 passed to SapRfcReadTable::select() must not be an empty string
84-
Argument 3 passed to SapRfcReadTable::select() must be of the type array, string given
85-
Argument 4 passed to SapRfcReadTable::select() must be of the type integer, array given
84+
Argument 3 passed to SapRfcReadTable::select() must be of the type array or null, string given
85+
Argument 4 passed to SapRfcReadTable::select() must be of the type integer or null, array given
8686
Argument 4 passed to SapRfcReadTable::select() must not be negative (-1)
87-
Argument 5 passed to SapRfcReadTable::select() must be of the type integer, array given
87+
Argument 5 passed to SapRfcReadTable::select() must be of the type integer or null, array given
8888
Argument 5 passed to SapRfcReadTable::select() must not be negative (-3)
89-
Argument 6 passed to SapRfcReadTable::select() must be of the type boolean, array given
89+
Argument 6 passed to SapRfcReadTable::select() must be of the type boolean or null, array given
9090
There is no connection to a SAP R/3 system

tests/sap_Sap___construct_error.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ catch (TypeError $e ) {
99
}
1010
?>
1111
--EXPECT--
12-
Argument 1 passed to Sap::__construct() must be of the type array, string given
12+
Argument 1 passed to Sap::__construct() must be of the type array or null, string given

tests/sap_Sap_call_error.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,6 @@ catch (LogicException $e) {
3030
?>
3131
--EXPECT--
3232
Argument 1 passed to Sap::call() must be of the type string, array given
33-
Argument 2 passed to Sap::call() must be of the type array, string given
34-
Argument 3 passed to Sap::call() must be of the type boolean, array given
33+
Argument 2 passed to Sap::call() must be of the type array or null, string given
34+
Argument 3 passed to Sap::call() must be of the type boolean or null, array given
3535
There is no connection to a SAP R/3 system

0 commit comments

Comments
 (0)