File tree Expand file tree Collapse file tree 4 files changed +72
-0
lines changed Expand file tree Collapse file tree 4 files changed +72
-0
lines changed Original file line number Diff line number Diff line change @@ -21,4 +21,28 @@ public function testInvalidCodeParsing()
21
21
$ scanner = new Scanner ();
22
22
$ scanner ->scan (__DIR__ .'/../../fixtures/general/InvalidCode.php ' );
23
23
}
24
+
25
+ public function testPHP70 ()
26
+ {
27
+ $ scanner = new Scanner ();
28
+ $ scanner ->scan (__DIR__ .'/../../fixtures/general/PHP7.0.php ' );
29
+
30
+ $ this ->assertTrue (true );
31
+ }
32
+
33
+ public function testPHP71 ()
34
+ {
35
+ $ scanner = new Scanner ();
36
+ $ scanner ->scan (__DIR__ .'/../../fixtures/general/PHP7.1.php ' );
37
+
38
+ $ this ->assertTrue (true );
39
+ }
40
+
41
+ public function testPHP72 ()
42
+ {
43
+ $ scanner = new Scanner ();
44
+ $ scanner ->scan (__DIR__ .'/../../fixtures/general/PHP7.2.php ' );
45
+
46
+ $ this ->assertTrue (true );
47
+ }
24
48
}
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ function testScalarTypes (string $ test )
4
+ {
5
+
6
+ }
7
+
8
+ function testReturnType (): array
9
+ {
10
+ return [];
11
+ }
12
+
13
+ function testNullCoalescingOperator ()
14
+ {
15
+ return 1 ?? 2 ;
16
+ }
17
+
18
+ function testSpaceshipOperator ()
19
+ {
20
+ return 1 <=> 1 ;
21
+ }
22
+
23
+ function testAnonymousClass ()
24
+ {
25
+ new class {
26
+ public function test ()
27
+ {
28
+
29
+ }
30
+ };
31
+ }
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ function testNullableTypes (?string $ test )
4
+ {
5
+
6
+ }
7
+
8
+ function testNullFunctions (): void
9
+ {
10
+
11
+ }
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ function testNewObjectType (): object
4
+ {
5
+
6
+ }
You can’t perform that action at this time.
0 commit comments