@@ -32,21 +32,21 @@ protected function setUp(): void
3232 public function testGetDescriptionReturnsCorrectDescription (): void
3333 {
3434 $ method = new \ReflectionMethod (DocBlockTestFixture::class, 'methodWithSummaryAndDescription ' );
35- $ docComment = $ method ->getDocComment () ?: null ;
35+ $ docComment = $ method ->getDocComment ();
3636 $ docBlock = $ this ->parser ->parseDocBlock ($ docComment );
3737 $ expectedDesc = "Summary line here. \n\nThis is a longer description spanning \nmultiple lines. \nIt might contain *markdown* or `code`. " ;
3838 $ this ->assertEquals ($ expectedDesc , $ this ->parser ->getDescription ($ docBlock ));
3939
4040 $ method2 = new \ReflectionMethod (DocBlockTestFixture::class, 'methodWithSummaryOnly ' );
41- $ docComment2 = $ method2 ->getDocComment () ?: null ;
41+ $ docComment2 = $ method2 ->getDocComment ();
4242 $ docBlock2 = $ this ->parser ->parseDocBlock ($ docComment2 );
4343 $ this ->assertEquals ('Simple summary line. ' , $ this ->parser ->getDescription ($ docBlock2 ));
4444 }
4545
4646 public function testGetParamTagsReturnsStructuredParamInfo (): void
4747 {
4848 $ method = new \ReflectionMethod (DocBlockTestFixture::class, 'methodWithParams ' );
49- $ docComment = $ method ->getDocComment () ?: null ;
49+ $ docComment = $ method ->getDocComment ();
5050 $ docBlock = $ this ->parser ->parseDocBlock ($ docComment );
5151 $ params = $ this ->parser ->getParamTags ($ docBlock );
5252
@@ -97,7 +97,7 @@ public function testGetParamTagsReturnsStructuredParamInfo(): void
9797 public function testGetTagsByNameReturnsSpecificTags (): void
9898 {
9999 $ method = new \ReflectionMethod (DocBlockTestFixture::class, 'methodWithMultipleTags ' );
100- $ docComment = $ method ->getDocComment () ?: null ;
100+ $ docComment = $ method ->getDocComment ();
101101 $ docBlock = $ this ->parser ->parseDocBlock ($ docComment );
102102
103103 $ this ->assertInstanceOf (DocBlock::class, $ docBlock );
@@ -121,7 +121,7 @@ public function testGetTagsByNameReturnsSpecificTags(): void
121121 public function testHandlesMethodWithNoDocblockGracefully (): void
122122 {
123123 $ method = new \ReflectionMethod (DocBlockTestFixture::class, 'methodWithNoDocBlock ' );
124- $ docComment = $ method ->getDocComment () ?: null ;
124+ $ docComment = $ method ->getDocComment ();
125125 $ docBlock = $ this ->parser ->parseDocBlock ($ docComment );
126126
127127 $ this ->assertNull ($ docBlock );
0 commit comments