Skip to content

Commit ede7ae7

Browse files
authored
Make AbstractAnnotation::$_context non-nullable (#2008)
1 parent f66289a commit ede7ae7

2 files changed

Lines changed: 1 addition & 5 deletions

File tree

src/Annotations/AbstractAnnotation.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ abstract class AbstractAnnotation implements \JsonSerializable
3535
*/
3636
public $attachables = Generator::UNDEFINED;
3737

38-
public ?Context $_context;
38+
public Context $_context;
3939

4040
/**
4141
* Annotations that couldn't be merged by mapping or postprocessing.

src/Processors/Concerns/DocblockTrait.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,6 @@ trait DocblockTrait
2929
*/
3030
public function isDocblockRoot(OA\AbstractAnnotation $annotation): bool
3131
{
32-
if (!$annotation->_context) {
33-
return true;
34-
}
35-
3632
if (1 == count($annotation->_context->annotations)) {
3733
return true;
3834
}

0 commit comments

Comments
 (0)