33namespace Bug13384c ;
44
55function doFoo (): bool {
6- return false ;
6+ return returnsFalse () ;
77}
88
99function doFoo2 (): bool {
10- return true ;
10+ return returnsTrue () ;
1111}
1212
1313function doFoo3 (): bool {
@@ -20,22 +20,22 @@ function doFoo3(): bool {
2020
2121class Bug13384c {
2222 public function doBarPublic (): bool {
23- return false ;
23+ return returnsFalse () ;
2424 }
2525
2626 /**
2727 * @return false
2828 */
2929 private function doBarPhpdocReturn (): bool {
30- return false ;
30+ return returnsFalse () ;
3131 }
3232
3333 private function doBar (): bool {
34- return false ;
34+ return returnsFalse () ;
3535 }
3636
3737 private function doBar2 (): bool {
38- return true ;
38+ return returnsTrue () ;
3939 }
4040
4141 private function doBar3 (): bool {
@@ -46,25 +46,25 @@ private function doBar3(): bool {
4646 }
4747
4848 private function doBarMixed () {
49- return true ;
49+ return returnsTrue () ;
5050 }
5151
5252 /**
5353 * @return bool
5454 */
5555 private function doBarPhpdoc () {
56- return true ;
56+ return returnsTrue () ;
5757 }
5858
5959}
6060
6161class Bug13384Static {
6262 private static function doBar (): bool {
63- return false ;
63+ return returnsFalse () ;
6464 }
6565
6666 private static function doBar2 (): bool {
67- return true ;
67+ return returnsTrue () ;
6868 }
6969
7070 private static function doBar3 (): bool {
@@ -75,14 +75,14 @@ private static function doBar3(): bool {
7575 }
7676
7777 private static function doBarMixed () {
78- return true ;
78+ return returnsTrue () ;
7979 }
8080
8181 /**
8282 * @return bool
8383 */
8484 private static function doBarPhpdoc () {
85- return true ;
85+ return returnsTrue () ;
8686 }
8787
8888}
@@ -91,18 +91,18 @@ private static function doBarPhpdoc() {
9191 * @return bool
9292 */
9393function doFooPhpdoc () {
94- return true ;
94+ return returnsTrue () ;
9595}
9696
9797/**
9898 * @return bool
9999 */
100100function doFooPhpdoc2 () {
101- return false ;
101+ return returnsFalse () ;
102102}
103103
104104function doFooMixed () {
105- return true ;
105+ return returnsTrue () ;
106106}
107107
108108/**
@@ -112,6 +112,17 @@ function returnsTrue(): bool {
112112 return true ;
113113}
114114
115- function callsReturnsTrue (): bool {
116- return returnsTrue ();
115+ /**
116+ * @return false
117+ */
118+ function returnsFalse (): bool {
119+ return false ;
120+ }
121+
122+ function returnsTrueNoPhpdoc (): bool {
123+ return true ;
124+ }
125+
126+ function returnsFalseNoPhpdoc (): bool {
127+ return false ;
117128}
0 commit comments