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/returnTypes.test')
-rw-r--r--vendor/nikic/php-parser/test/code/parser/stmt/function/returnTypes.test52
1 files changed, 52 insertions, 0 deletions
diff --git a/vendor/nikic/php-parser/test/code/parser/stmt/function/returnTypes.test b/vendor/nikic/php-parser/test/code/parser/stmt/function/returnTypes.test
new file mode 100644
index 0000000..ca6c310
--- /dev/null
+++ b/vendor/nikic/php-parser/test/code/parser/stmt/function/returnTypes.test
@@ -0,0 +1,52 @@
+Return type declarations
+-----
+<?php
+
+function test1() {}
+function test2() : array {}
+function test3() : callable {}
+function test4() : Foo\Bar {}
+-----
+array(
+ 0: Stmt_Function(
+ byRef: false
+ name: test1
+ params: array(
+ )
+ returnType: null
+ stmts: array(
+ )
+ )
+ 1: Stmt_Function(
+ byRef: false
+ name: test2
+ params: array(
+ )
+ returnType: array
+ stmts: array(
+ )
+ )
+ 2: Stmt_Function(
+ byRef: false
+ name: test3
+ params: array(
+ )
+ returnType: callable
+ stmts: array(
+ )
+ )
+ 3: Stmt_Function(
+ byRef: false
+ name: test4
+ params: array(
+ )
+ returnType: Name(
+ parts: array(
+ 0: Foo
+ 1: Bar
+ )
+ )
+ stmts: array(
+ )
+ )
+)