Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/php-static-scanner-instrumentalization.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/nikic/php-parser/test/code/parser/stmt/function/nullableTypes.test')
-rw-r--r--vendor/nikic/php-parser/test/code/parser/stmt/function/nullableTypes.test47
1 files changed, 47 insertions, 0 deletions
diff --git a/vendor/nikic/php-parser/test/code/parser/stmt/function/nullableTypes.test b/vendor/nikic/php-parser/test/code/parser/stmt/function/nullableTypes.test
new file mode 100644
index 0000000..d96df4f
--- /dev/null
+++ b/vendor/nikic/php-parser/test/code/parser/stmt/function/nullableTypes.test
@@ -0,0 +1,47 @@
+Nullable types
+-----
+<?php
+
+function test(?Foo $bar, ?string $foo) : ?Baz {
+}
+-----
+!!php7
+array(
+ 0: Stmt_Function(
+ byRef: false
+ name: test
+ params: array(
+ 0: Param(
+ type: NullableType(
+ type: Name(
+ parts: array(
+ 0: Foo
+ )
+ )
+ )
+ byRef: false
+ variadic: false
+ name: bar
+ default: null
+ )
+ 1: Param(
+ type: NullableType(
+ type: string
+ )
+ byRef: false
+ variadic: false
+ name: foo
+ default: null
+ )
+ )
+ returnType: NullableType(
+ type: Name(
+ parts: array(
+ 0: Baz
+ )
+ )
+ )
+ stmts: array(
+ )
+ )
+) \ No newline at end of file