diff --git a/CHANGELOG.md b/CHANGELOG.md index f30f44d5..56442966 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,6 +25,8 @@ Yii Framework 2 apidoc extension Change Log - Enh #196: Added support for PHPDoc inline links (arogachev) - Enh #147: Added feature of viewing method source code without external links (arogachev) - Bug #168: Fixed handling of inheritance (arogachev) +- Bug #240: Fixed a bug when a "virtual" / "magic" property's full description was displayed instead of preview in + properties list (arogachev) - Bug #239: Do not show a "virtual" / "magic" methods's full description if it matches short description (arogachev) diff --git a/models/TypeDoc.php b/models/TypeDoc.php index eb170731..38159816 100644 --- a/models/TypeDoc.php +++ b/models/TypeDoc.php @@ -201,6 +201,8 @@ public function __construct($reflector = null, $context = null, $config = []) } if ($tag instanceof Property || $tag instanceof PropertyRead || $tag instanceof PropertyWrite) { + $shortDescription = $tag->getDescription() ? BaseDoc::extractFirstSentence($tag->getDescription()): ''; + $property = new PropertyDoc(null, $context, [ 'sourceFile' => $this->sourceFile, 'name' => '$' . $tag->getVariableName(), @@ -209,7 +211,7 @@ public function __construct($reflector = null, $context = null, $config = []) 'definedBy' => $this->name, 'type' => (string) $tag->getType(), 'types' => $this->splitTypes($tag->getType()), - 'shortDescription' => $tag->getDescription(), + 'shortDescription' => $shortDescription, 'description' => $tag->getDescription(), ]);

AltStyle によって変換されたページ (->オリジナル) /