File tree Expand file tree Collapse file tree
rules-tests/TypeDeclaration/Rector/ClassMethod/ReturnTypeFromStrictTypedCallRector/Fixture Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ <?php
2+
3+ namespace Rector \Tests \TypeDeclaration \Rector \ClassMethod \ReturnTypeFromStrictTypedCallRector \Fixture ;
4+
5+ final class WrongTypedIntConstant
6+ {
7+ /**
8+ * @var string
9+ */
10+ const WRONG_TYPED = 0 ;
11+
12+ public function getData ()
13+ {
14+ if (rand (0 ,1 )) {
15+ return self ::WRONG_TYPED ;
16+ }
17+
18+ return $ this ->getInt ();
19+ }
20+
21+ public function getInt (): int
22+ {
23+
24+ }
25+ }
26+
27+ ?>
28+ -----
29+ <?php
30+
31+ namespace Rector \Tests \TypeDeclaration \Rector \ClassMethod \ReturnTypeFromStrictTypedCallRector \Fixture ;
32+
33+ final class WrongTypedIntConstant
34+ {
35+ /**
36+ * @var string
37+ */
38+ const WRONG_TYPED = 0 ;
39+
40+ public function getData (): int
41+ {
42+ if (rand (0 ,1 )) {
43+ return self ::WRONG_TYPED ;
44+ }
45+
46+ return $ this ->getInt ();
47+ }
48+
49+ public function getInt (): int
50+ {
51+
52+ }
53+ }
54+
55+ ?>
You can’t perform that action at this time.
0 commit comments