File tree Expand file tree Collapse file tree 2 files changed +57
-1
lines changed Expand file tree Collapse file tree 2 files changed +57
-1
lines changed Original file line number Diff line number Diff line change 1212namespace HyperfTest \CodeParser ;
1313
1414use Hyperf \CodeParser \PhpDocReader ;
15- use HyperfTest \Utils \Stub \DocFoo ;
15+ use HyperfTest \CodeParser \Stub \DocFoo ;
1616use PHPUnit \Framework \Attributes \CoversNothing ;
1717use PHPUnit \Framework \TestCase ;
1818use ReflectionClass ;
2222 * @coversNothing
2323 */
2424#[CoversNothing]
25+ /**
26+ * @internal
27+ * @coversNothing
28+ */
2529class PhpDocReaderTest extends TestCase
2630{
2731 public function testGetReturnClass ()
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ declare (strict_types=1 );
4+ /**
5+ * This file is part of Hyperf.
6+ *
7+ * @link https://www.hyperf.io
8+ * @document https://hyperf.wiki
9+ * @contact group@hyperf.io
10+ * @license https://github.com/hyperf/hyperf/blob/master/LICENSE
11+ */
12+ namespace HyperfTest \CodeParser \Stub ;
13+
14+ class DocFoo
15+ {
16+ public function getBuiltinInt (): ?int
17+ {
18+ return 1 ;
19+ }
20+
21+ /**
22+ * @return string
23+ */
24+ public function getString ()
25+ {
26+ return uniqid ();
27+ }
28+
29+ /**
30+ * @return int|string
31+ */
32+ public function getStringOrInt ()
33+ {
34+ return uniqid ();
35+ }
36+
37+ /**
38+ * @return DocFoo
39+ */
40+ public function getSelf ()
41+ {
42+ return $ this ;
43+ }
44+
45+ /**
46+ * @return bool|DocFoo
47+ */
48+ public function getSelfOrNot ()
49+ {
50+ return $ this ;
51+ }
52+ }
You can’t perform that action at this time.
0 commit comments