File tree Expand file tree Collapse file tree 1 file changed +21
-2
lines changed
tests/PHPStan/Rules/Functions Expand file tree Collapse file tree 1 file changed +21
-2
lines changed Original file line number Diff line number Diff line change @@ -1984,7 +1984,7 @@ public function testBug3107(): void
1984
1984
1985
1985
public function testBug12676 (): void
1986
1986
{
1987
- $ this -> analyse ([ __DIR__ . ' /data/bug-12676.php ' ], [
1987
+ $ errors = [
1988
1988
[
1989
1989
'Parameter #1 $array is passed by reference so it does not accept @readonly property Bug12676\A::$a. ' ,
1990
1990
15 ,
@@ -1997,7 +1997,26 @@ public function testBug12676(): void
1997
1997
'Parameter #1 $array is passed by reference so it does not accept static @readonly property Bug12676\C::$readonlyArr. ' ,
1998
1998
35 ,
1999
1999
],
2000
- ]);
2000
+ ];
2001
+
2002
+ if (PHP_VERSION_ID < 80000 ) {
2003
+ $ errors = [
2004
+ [
2005
+ 'Parameter #1 $array_arg is passed by reference so it does not accept @readonly property Bug12676\A::$a. ' ,
2006
+ 15 ,
2007
+ ],
2008
+ [
2009
+ 'Parameter #1 $array_arg is passed by reference so it does not accept @readonly property Bug12676\B::$readonlyArr. ' ,
2010
+ 25 ,
2011
+ ],
2012
+ [
2013
+ 'Parameter #1 $array_arg is passed by reference so it does not accept static @readonly property Bug12676\C::$readonlyArr. ' ,
2014
+ 35 ,
2015
+ ],
2016
+ ];
2017
+ }
2018
+
2019
+ $ this ->analyse ([__DIR__ . '/data/bug-12676.php ' ], $ errors );
2001
2020
}
2002
2021
2003
2022
}
You can’t perform that action at this time.
0 commit comments