Skip to content

Commit 60264a9

Browse files
github-actions[bot]krissssDerManoMann
authored
[Backport #2008 to 5.x] Make AbstractAnnotation::$_context non-nullable (#2009)
--------- Co-authored-by: kriss <462679766@qq.com> Co-authored-by: DerManoMann <mano@radebatz.net>
1 parent c8b6d48 commit 60264a9

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
@@ -36,7 +36,7 @@ abstract class AbstractAnnotation implements \JsonSerializable
3636
public $attachables = Generator::UNDEFINED;
3737

3838
/**
39-
* @var Context|null
39+
* @var Context
4040
*/
4141
public $_context;
4242

src/Processors/Concerns/DocblockTrait.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,6 @@ trait DocblockTrait
1717
*/
1818
public function isDocblockRoot(OA\AbstractAnnotation $annotation): bool
1919
{
20-
if (!$annotation->_context) {
21-
return true;
22-
}
23-
2420
if (1 == count($annotation->_context->annotations)) {
2521
return true;
2622
}

0 commit comments

Comments
 (0)