Security update for Core, with self-updated composer
[yaffs-website] / vendor / nikic / php-parser / test / code / parser / stmt / function / returnTypes.test
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 (file)
index 0000000..ca6c310
--- /dev/null
@@ -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(
+        )
+    )
+)