Skip to content

Commit cc922b4

Browse files
authored
Remove useless codes in hyperf/utils (#5810)
1 parent 5a34ad6 commit cc922b4

File tree

2 files changed

+57
-1
lines changed

2 files changed

+57
-1
lines changed

tests/PhpDocReaderTest.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
namespace HyperfTest\CodeParser;
1313

1414
use Hyperf\CodeParser\PhpDocReader;
15-
use HyperfTest\Utils\Stub\DocFoo;
15+
use HyperfTest\CodeParser\Stub\DocFoo;
1616
use PHPUnit\Framework\Attributes\CoversNothing;
1717
use PHPUnit\Framework\TestCase;
1818
use ReflectionClass;
@@ -22,6 +22,10 @@
2222
* @coversNothing
2323
*/
2424
#[CoversNothing]
25+
/**
26+
* @internal
27+
* @coversNothing
28+
*/
2529
class PhpDocReaderTest extends TestCase
2630
{
2731
public function testGetReturnClass()

tests/Stub/DocFoo.php

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
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+
}

0 commit comments

Comments
 (0)